fix warnings/errors for gcc4.0, icc and valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7689 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cc9f9be00f
commit
8bcc0bf8eb
12 changed files with 24 additions and 65 deletions
|
|
@ -36,12 +36,14 @@ void emit_args(SwigType *rt, ParmList *l, Wrapper *f) {
|
|||
|
||||
/* Handle return type */
|
||||
if (rt && (SwigType_type(rt) != T_VOID)) {
|
||||
SwigType *vt = 0;
|
||||
vt = cplus_value_type(rt);
|
||||
if (!vt) {
|
||||
Wrapper_add_local(f,"result", SwigType_lstr(rt,"result"));
|
||||
} else {
|
||||
Wrapper_add_local(f,"result", SwigType_lstr(vt,"result"));
|
||||
SwigType *vt = cplus_value_type(rt);
|
||||
SwigType *tt = vt ? vt : rt;
|
||||
if (SwigType_ispointer(tt)) {
|
||||
Wrapper_add_localv(f,"result", SwigType_lstr(tt,"result"), "= 0", NULL);
|
||||
} else{
|
||||
Wrapper_add_local(f,"result", SwigType_lstr(tt,"result"));
|
||||
}
|
||||
if (vt) {
|
||||
Delete(vt);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2781,7 +2781,7 @@ int PYTHON::classDirectorMethod(Node *n, Node *parent, String *super) {
|
|||
}
|
||||
/* declare Python return value */
|
||||
if (!is_void) {
|
||||
Wrapper_add_local(w, "result", "PyObject *result");
|
||||
Wrapper_add_local(w, "result", "PyObject *result = 0");
|
||||
}
|
||||
|
||||
/* direct call to superclass if _up is set */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue