clang: remove warnings.

sayer/1.4-spce2.6
Raphael Coeffic 16 years ago
parent 2db6efff3b
commit 878cf437d0

@ -192,7 +192,7 @@ dia_tcp_conn* tcp_create_connection(const char* host, int port,
return conn_st;
}
meth=TLSv1_client_method();
meth=(SSL_METHOD *)TLSv1_client_method();
conn_st->ctx = SSL_CTX_new(meth);
if (!conn_st->ctx) {

@ -302,7 +302,8 @@ IvrDialog* IvrFactory::newDlg(const string& name)
IvrDialog* dlg = new IvrDialog();
PyObject* c_dlg = PyCObject_FromVoidPtr(dlg,NULL);
PyObject* dlg_inst = PyObject_CallMethod(mod_desc.dlg_class,"__new__","OO",
PyObject* dlg_inst = PyObject_CallMethod(mod_desc.dlg_class,
(char*)"__new__",(char*)"OO",
mod_desc.dlg_class,c_dlg);
Py_DECREF(c_dlg);
@ -653,7 +654,7 @@ PyObject_VaCallMethod(PyObject *o, char *name, char *format, va_list va)
return retval;
}
bool IvrDialog::callPyEventHandler(char* name, char* fmt, ...)
bool IvrDialog::callPyEventHandler(const char* name, const char* fmt, ...)
{
bool ret=false;
va_list va;
@ -661,7 +662,7 @@ bool IvrDialog::callPyEventHandler(char* name, char* fmt, ...)
PYLOCK;
va_start(va, fmt);
PyObject* o = PyObject_VaCallMethod(py_dlg,name,fmt,va);
PyObject* o = PyObject_VaCallMethod(py_dlg,(char*)name,(char*)fmt,va);
va_end(va);
if(!o) {

@ -121,7 +121,7 @@ class IvrDialog : public AmB2BCallerSession
PyObject *py_mod;
PyObject *py_dlg;
bool callPyEventHandler(char* name, char* fmt, ...);
bool callPyEventHandler(const char* name, const char* fmt, ...);
void process(AmEvent* event);

@ -223,7 +223,7 @@ static PyObject* IvrAudioFile_exportRaw(IvrAudioFile* self, PyObject*)
self->af->rewind();
return PyFile_FromFile(self->af->getfp(),"","rwb",NULL);
return PyFile_FromFile(self->af->getfp(),(char*)"",(char*)"rwb",NULL);
}
@ -289,9 +289,9 @@ static int IvrAudioFile_setloop(IvrAudioFile* self, PyObject* value, void*)
}
static PyGetSetDef IvrAudioFile_getseters[] = {
{"loop",
{(char*)"loop",
(getter)IvrAudioFile_getloop, (setter)IvrAudioFile_setloop,
"repeat mode",
(char*)"repeat mode",
NULL},
{NULL} /* Sentinel */
};

@ -23,7 +23,7 @@ typedef struct {
// Constructor
static PyObject* IvrDialogBase_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"ivr_dlg", NULL};
static char *kwlist[] = {(char*)"ivr_dlg", NULL};
IvrDialogBase *self;
self = (IvrDialogBase *)type->tp_alloc(type, 0);
@ -184,7 +184,7 @@ static PyObject* IvrDialogBase_dropSession(IvrDialogBase* self, PyObject*)
static PyObject* IvrDialogBase_bye(IvrDialogBase* self, PyObject* args)
{
char* hdrs = "";
char* hdrs = (char*)"";
assert(self->p_dlg);
@ -603,13 +603,13 @@ static PyMethodDef IvrDialogBase_methods[] = {
};
static PyGetSetDef IvrDialogBase_getset[] = {
{"dialog",
{(char*)"dialog",
(getter)IvrDialogBase_getdialog, NULL,
"the dialog property",
(char*)"the dialog property",
NULL},
{"invite_req",
{(char*)"invite_req",
(getter)IvrDialogBase_getinvite_req, NULL,
"the initial invite request",
(char*)"the initial invite request",
NULL},
{NULL} /* Sentinel */
};

@ -13,7 +13,7 @@ typedef struct {
// Constructor
static PyObject* IvrSipDialog_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"ivr_dlg", NULL};
static char *kwlist[] = {(char*)"ivr_dlg", NULL};
IvrSipDialog *self;
self = (IvrSipDialog *)type->tp_alloc(type, 0);
@ -92,19 +92,19 @@ IvrSipDialog_getcseq(IvrSipDialog *self, void *closure)
}
static PyGetSetDef IvrSipDialog_getset[] = {
{"user", (getter)IvrSipDialog_getuser, NULL, "local user", NULL},
{"domain", (getter)IvrSipDialog_getdomain, NULL, "local domain", NULL},
{"local_uri", (getter)IvrSipDialog_getlocal_uri, NULL, "local uri", NULL},
{"remote_uri", (getter)IvrSipDialog_getremote_uri, (setter)IvrSipDialog_setremote_uri, "remote uri", NULL},
{"contact_uri", (getter)IvrSipDialog_getcontact_uri, NULL, "pre-calculated contact uri", NULL},
{"callid", (getter)IvrSipDialog_getcallid, NULL, "call id", NULL},
{"remote_tag", (getter)IvrSipDialog_getremote_tag, NULL, "remote tag", NULL},
{"local_tag", (getter)IvrSipDialog_getlocal_tag, NULL, "local tag", NULL},
{"remote_party",(getter)IvrSipDialog_getremote_party, NULL, "To/From", NULL},
{"local_party", (getter)IvrSipDialog_getlocal_party, NULL, "To/From", NULL},
{"route", (getter)IvrSipDialog_getroute, NULL, "record routing", NULL},
{"outbound_proxy", (getter)IvrSipDialog_getoutbound_proxy, NULL, "outbound proxy", NULL},
{"cseq", (getter)IvrSipDialog_getcseq, NULL, "CSeq for next request", NULL},
{(char*)"user", (getter)IvrSipDialog_getuser, NULL, (char*)"local user", NULL},
{(char*)"domain", (getter)IvrSipDialog_getdomain, NULL, (char*)"local domain", NULL},
{(char*)"local_uri", (getter)IvrSipDialog_getlocal_uri, NULL, (char*)"local uri", NULL},
{(char*)"remote_uri", (getter)IvrSipDialog_getremote_uri, (setter)IvrSipDialog_setremote_uri, (char*)"remote uri", NULL},
{(char*)"contact_uri", (getter)IvrSipDialog_getcontact_uri, NULL, (char*)"pre-calculated contact uri", NULL},
{(char*)"callid", (getter)IvrSipDialog_getcallid, NULL, (char*)"call id", NULL},
{(char*)"remote_tag", (getter)IvrSipDialog_getremote_tag, NULL, (char*)"remote tag", NULL},
{(char*)"local_tag", (getter)IvrSipDialog_getlocal_tag, NULL, (char*)"local tag", NULL},
{(char*)"remote_party",(getter)IvrSipDialog_getremote_party, NULL, (char*)"To/From", NULL},
{(char*)"local_party", (getter)IvrSipDialog_getlocal_party, NULL, (char*)"To/From", NULL},
{(char*)"route", (getter)IvrSipDialog_getroute, NULL, (char*)"record routing", NULL},
{(char*)"outbound_proxy", (getter)IvrSipDialog_getoutbound_proxy, NULL, (char*)"outbound proxy", NULL},
{(char*)"cseq", (getter)IvrSipDialog_getcseq, NULL, (char*)"CSeq for next request", NULL},
{NULL} /* Sentinel */
};

@ -33,7 +33,7 @@ typedef struct {
// Constructor
static PyObject* IvrSipReply_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"ivr_req", NULL};
static char *kwlist[] = {(char*)"ivr_req", NULL};
IvrSipReply *self;
self = (IvrSipReply *)type->tp_alloc(type, 0);
@ -95,15 +95,15 @@ IvrSipReply_getcode(IvrSipReply *self, void *closure)
}
static PyGetSetDef IvrSipReply_getset[] = {
{"code", (getter)IvrSipReply_getcode, NULL, "code", NULL},
{"reason", (getter)IvrSipReply_getreason, NULL, "reason", NULL},
{"next_request_uri", (getter)IvrSipReply_getnext_request_uri, NULL, "next_request_uri", NULL},
{"route", (getter)IvrSipReply_getroute, NULL, "route", NULL},
{"hdrs", (getter)IvrSipReply_gethdrs, NULL, "hdrs", NULL},
{"body", (getter)IvrSipReply_getbody, NULL, "body", NULL},
{"remote_tag", (getter)IvrSipReply_getremote_tag, NULL, "remote_tag", NULL},
{"local_tag", (getter)IvrSipReply_getlocal_tag, NULL, "local_tag", NULL},
{"cseq", (getter)IvrSipReply_getcseq, NULL, "CSeq for next request", NULL},
{(char*)"code", (getter)IvrSipReply_getcode, NULL, (char*)"code", NULL},
{(char*)"reason", (getter)IvrSipReply_getreason, NULL, (char*)"reason", NULL},
{(char*)"next_request_uri",(getter)IvrSipReply_getnext_request_uri, NULL, (char*)"next_request_uri", NULL},
{(char*)"route", (getter)IvrSipReply_getroute, NULL, (char*)"route", NULL},
{(char*)"hdrs", (getter)IvrSipReply_gethdrs, NULL, (char*)"hdrs", NULL},
{(char*)"body", (getter)IvrSipReply_getbody, NULL, (char*)"body", NULL},
{(char*)"remote_tag", (getter)IvrSipReply_getremote_tag, NULL, (char*)"remote_tag", NULL},
{(char*)"local_tag", (getter)IvrSipReply_getlocal_tag, NULL, (char*)"local_tag", NULL},
{(char*)"cseq", (getter)IvrSipReply_getcseq, NULL, (char*)"cseq", NULL},
{NULL} /* Sentinel */
};

@ -35,7 +35,7 @@ typedef struct {
// Constructor
static PyObject* IvrSipRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"ivr_req", NULL};
static char *kwlist[] = {(char*)"ivr_req", NULL};
IvrSipRequest *self;
self = (IvrSipRequest *)type->tp_alloc(type, 0);
@ -64,7 +64,7 @@ static PyObject* IvrSipRequest_new(PyTypeObject *type, PyObject *args, PyObject
static PyObject* IvrSipRequest_newRef(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"ivr_req", NULL};
static char *kwlist[] = {(char*)"ivr_req", NULL};
IvrSipRequest *self;
self = (IvrSipRequest *)type->tp_alloc(type, 0);
@ -153,23 +153,20 @@ def_IvrSipRequest_SETTER(IvrSipRequest_sethdrs, hdrs)
#undef def_IvrSipRequest_SETTER
static PyGetSetDef IvrSipRequest_getset[] = {
{"method", (getter)IvrSipRequest_getmethod, NULL, "method", NULL},
{"user", (getter)IvrSipRequest_getuser, NULL, "local user", NULL},
{"domain", (getter)IvrSipRequest_getdomain, NULL, "local domain", NULL},
{"r_uri", (getter)IvrSipRequest_getr_uri, NULL, "port", NULL},
{"from_uri", (getter)IvrSipRequest_getfrom_uri, NULL, "port", NULL},
{"from", (getter)IvrSipRequest_getfrom, NULL, "port", NULL},
{"to", (getter)IvrSipRequest_getto, NULL, "port", NULL},
{"callid", (getter)IvrSipRequest_getcallid, NULL, "call id", NULL},
{"from_tag", (getter)IvrSipRequest_getfrom_tag, NULL, "remote tag", NULL},
{"to_tag", (getter)IvrSipRequest_getto_tag, NULL, "local tag", NULL},
{"route", (getter)IvrSipRequest_getroute, NULL, "record routing", NULL},
{"cseq", (getter)IvrSipRequest_getcseq, NULL, "CSeq for next request", NULL},
{"body", (getter)IvrSipRequest_getbody, NULL, "Body", NULL},
{"hdrs", (getter)IvrSipRequest_gethdrs, (setter)IvrSipRequest_sethdrs, "Additional headers", NULL},
{(char*)"method", (getter)IvrSipRequest_getmethod, NULL, (char*)"method", NULL},
{(char*)"user", (getter)IvrSipRequest_getuser, NULL, (char*)"local user", NULL},
{(char*)"domain", (getter)IvrSipRequest_getdomain, NULL, (char*)"local domain", NULL},
{(char*)"r_uri", (getter)IvrSipRequest_getr_uri, NULL, (char*)"port", NULL},
{(char*)"from_uri", (getter)IvrSipRequest_getfrom_uri, NULL, (char*)"port", NULL},
{(char*)"from", (getter)IvrSipRequest_getfrom, NULL, (char*)"port", NULL},
{(char*)"to", (getter)IvrSipRequest_getto, NULL, (char*)"port", NULL},
{(char*)"callid", (getter)IvrSipRequest_getcallid, NULL, (char*)"call id", NULL},
{(char*)"from_tag", (getter)IvrSipRequest_getfrom_tag, NULL, (char*)"remote tag", NULL},
{(char*)"to_tag", (getter)IvrSipRequest_getto_tag, NULL, (char*)"local tag", NULL},
{(char*)"route", (getter)IvrSipRequest_getroute, NULL, (char*)"record routing", NULL},
{(char*)"cseq", (getter)IvrSipRequest_getcseq, NULL, (char*)"CSeq for next request", NULL},
{(char*)"body", (getter)IvrSipRequest_getbody, NULL, (char*)"Body", NULL},
{(char*)"hdrs", (getter)IvrSipRequest_gethdrs, (setter)IvrSipRequest_sethdrs, (char*)"Additional headers", NULL},
{NULL} /* Sentinel */
};

@ -50,7 +50,7 @@ using std::vector;
#define SMTP_ADDRESS_IP "localhost"
#define SMTP_PORT 25
class AmMail;
struct AmMail;
#define MODE_VOICEMAIL 0
#define MODE_BOX 1

@ -9,29 +9,29 @@
#ifndef CONFIG_H
#define CONFIG_H
/*efine SIGHANDLER_T int /* signal handlers are void */
/*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */
/*efine SIGHANDLER_T int*/ /* signal handlers are void */
/*efine HAS_SYSV_SIGNAL 1*/ /* sigs not blocked/reset? */
#define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */
/*efine HAS_LIMITS_H 1 /* /usr/include/limits.h */
/*efine HAS_LIMITS_H 1*/ /* /usr/include/limits.h */
#define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */
/*efine HAS_ERRNO_DECL 1 /* errno.h declares errno */
/*efine HAS_ERRNO_DECL 1*/ /* errno.h declares errno */
#define HAS_FSTAT 1 /* fstat syscall */
#define HAS_FCHMOD 1 /* fchmod syscall */
#define HAS_CHMOD 1 /* chmod syscall */
#define HAS_FCHOWN 1 /* fchown syscall */
#define HAS_CHOWN 1 /* chown syscall */
/*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */
/*efine HAS__FSETMODE 1*/ /* _fsetmode -- set file mode */
#define HAS_STRING_H 1 /* /usr/include/string.h */
/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */
/*efine HAS_STRINGS_H 1*/ /* /usr/include/strings.h */
#define HAS_UNISTD_H 1 /* /usr/include/unistd.h */
#define HAS_UTIME 1 /* POSIX utime(path, times) */
/*efine HAS_UTIMES 1 /* use utimes() syscall instead */
/*efine HAS_UTIMES 1*/ /* use utimes() syscall instead */
#define HAS_UTIME_H 1 /* UTIME header file */
/*efine HAS_UTIMBUF 1 /* struct utimbuf */
/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */
/*efine HAS_UTIMBUF 1*/ /* struct utimbuf */
/*efine HAS_UTIMEUSEC 1*/ /* microseconds in utimbuf? */
#endif /* CONFIG_H */

Loading…
Cancel
Save