diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index 130afb66c..4f231bacf 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -4143,7 +4143,7 @@ definetype : { /* scanner_check_typedef(); */ } expr { } $$.type = T_CHAR; $$.bitfield = 0; - $$.throws; + $$.throws = 0; } ; diff --git a/Source/Modules/allocate.cxx b/Source/Modules/allocate.cxx index eeae9633f..611e58b2c 100644 --- a/Source/Modules/allocate.cxx +++ b/Source/Modules/allocate.cxx @@ -171,8 +171,9 @@ class Allocate : public Dispatcher { String *base_decl = Getattr(nn,"decl"); if (base_decl) base_decl = SwigType_typedef_resolve_all(base_decl); if (Strstr(name,"~")) continue; /* Don't care about destructors */ + /* int implemented = 0; - /* Node *dn = Swig_symbol_clookup_local(name,0); + Node *dn = Swig_symbol_clookup_local(name,0); if (!dn) { Printf(stdout,"node: %x '%s'. base: %x '%s'. member '%s'\n", n, Getattr(n,"name"), base, Getattr(base,"name"), name); } diff --git a/Source/Modules/chicken.cxx b/Source/Modules/chicken.cxx index be2ca058c..7fab1f8f8 100644 --- a/Source/Modules/chicken.cxx +++ b/Source/Modules/chicken.cxx @@ -536,7 +536,7 @@ CHICKEN::functionWrapper(Node *n) int has_void_return = 0; int will_alloca = 0; for (p = l; p;) { - if (tm = Getattr(p,"tmap:argout:chicken_words")) { + if ((tm = Getattr(p,"tmap:argout:chicken_words"))) { Replaceall(tm,"$typename", mangle); if (strcmp(Char(tm), "void") == 0) continue; if (strcmp(Char(tm), "0") != 0) will_alloca = 1; @@ -553,7 +553,7 @@ CHICKEN::functionWrapper(Node *n) } } if ((tm = Swig_typemap_lookup_new("out",n,"result",0))) { - if (am = Getattr(n,"tmap:out:chicken_words")) { + if ((am = Getattr(n,"tmap:out:chicken_words"))) { Replaceall(am,"$typename", mangle); if (strcmp(Char(am), "void") == 0) { has_void_return = 1; @@ -1018,9 +1018,9 @@ CHICKEN::variableWrapper(Node *n) { // Now return the value of the variable - regardless // of evaluating or setting. - if (tm = Swig_typemap_lookup_new("varout",n,name,0)) { + if ((tm = Swig_typemap_lookup_new("varout",n,name,0))) { /* Calculate fixed alloca code */ - if (am = Getattr(n,"tmap:varout:chicken_words")) { + if ((am = Getattr(n,"tmap:varout:chicken_words"))) { Replaceall(am,"$typename", mangle); if (strcmp(Char(am), "0") != 0) { Wrapper_add_local(f,"known_space", "C_word *known_space"); @@ -1235,9 +1235,9 @@ CHICKEN::constantWrapper(Node *n) Wrapper_add_local(f, "resultobj", "C_word resultobj"); // Return the value of the variable - if (tm = Swig_typemap_lookup_new("varout",n,name,0)) { + if ((tm = Swig_typemap_lookup_new("varout",n,name,0))) { /* Calculate fixed alloca code */ - if (am = Getattr(n,"tmap:varout:chicken_words")) { + if ((am = Getattr(n,"tmap:varout:chicken_words"))) { Replaceall(am,"$typename", mangle); if (strcmp(Char(am), "0") != 0) { Wrapper_add_local(f,"known_space", "C_word *known_space"); @@ -1629,7 +1629,6 @@ CHICKEN::membervariableHandler(Node *n) int CHICKEN::memberconstantHandler(Node *n) { - String *iname = Getattr(n,"sym:name"); int oldclos = clos; if (clos) clos = clos | SCMCLOS_MEMBER; Language::memberconstantHandler(n); @@ -1641,8 +1640,6 @@ CHICKEN::memberconstantHandler(Node *n) int CHICKEN::staticmemberfunctionHandler(Node *n) { - String *iname = Getattr(n,"sym:name"); - int oldclos = clos; if (clos) clos = clos | SCMCLOS_STATIC_MEMBER; Language::staticmemberfunctionHandler(n); @@ -1654,8 +1651,6 @@ CHICKEN::staticmemberfunctionHandler(Node *n) int CHICKEN::staticmembervariableHandler(Node *n) { - String *iname = Getattr(n,"sym:name"); - int oldclos = clos; if (clos) clos = clos | SCMCLOS_STATIC_MEMBER; Language::staticmembervariableHandler(n); @@ -1668,7 +1663,6 @@ CHICKEN::staticmembervariableHandler(Node *n) int CHICKEN::destructorHandler(Node *n) { - String *iname = Getattr(n,"sym:name"); int oldclos = clos; if (clos) clos = clos | SCMCLOS_MEMBER; @@ -1681,7 +1675,6 @@ CHICKEN::destructorHandler(Node *n) int CHICKEN::constructorHandler(Node *n) { - String *iname = Getattr(n,"sym:name"); int oldclos = clos; if (clos) clos = clos | SCMCLOS_MEMBER; @@ -1971,8 +1964,8 @@ CHICKEN::namify(String *scmname) char *s = Char(scmname); const int l = Len(scmname); int case_is_set = 0; - int was_uppercase; - int pseudo_first; + int was_uppercase = 0; + int pseudo_first = 0; changedcase = 0; for (i=0; i < l; ++i, ++s) { diff --git a/Source/Modules/csharp.cxx b/Source/Modules/csharp.cxx index 69ab7648e..63a3f6987 100644 --- a/Source/Modules/csharp.cxx +++ b/Source/Modules/csharp.cxx @@ -1242,7 +1242,6 @@ class CSHARP : public Language { SwigType *t = Getattr(n,"type"); ParmList *l = Getattr(n,"parms"); String *java_function_name = Getattr(n,"java:funcname"); - String *java_shadow_function_name = Getattr(n,"java:shadowfuncname"); String *tm; Parm *p; int i; @@ -1285,7 +1284,6 @@ class CSHARP : public Language { if (!(variable_wrapper_flag && i==0)) { SwigType *pt = Getattr(p,"type"); - String *javaparamtype = NewString(""); /* Get the type of the first parameter */ if ((tm = Getattr(p,"tmap:jstype"))) { diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 81bbd393b..0b67d08e7 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -662,7 +662,7 @@ class JAVA : public Language { // Get any Java exception classes in the throw typemap ParmList *throw_parm_list = NULL; - if (throw_parm_list = Getattr(n,"throws")) { + if ((throw_parm_list = Getattr(n,"throws"))) { Swig_typemap_attach_parms("throws", throw_parm_list, f); for (p = throw_parm_list; p; p=nextSibling(p)) { if ((tm = Getattr(p,"tmap:throws"))) { diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx index cf37e2661..8626a7724 100644 --- a/Source/Modules/main.cxx +++ b/Source/Modules/main.cxx @@ -266,7 +266,7 @@ int SWIG_main(int argc, char *argv[], Language *l) { libfiles = NewList(); /* Check for SWIG_FEATURES environment variable */ - if (c = getenv("SWIG_FEATURES")) { + if ((c = getenv("SWIG_FEATURES"))) { while (*c!='\0') { while ((*c)==' ') { c++; diff --git a/Source/Modules/s-exp.cxx b/Source/Modules/s-exp.cxx index 16639bf43..2a9f2dcc1 100644 --- a/Source/Modules/s-exp.cxx +++ b/Source/Modules/s-exp.cxx @@ -187,7 +187,7 @@ public: // Following is a silly hack. It works around the limitation of // DOH's hash tables that only work with string keys! char address[16]; - sprintf(address, "%x%c", obj, list_p ? 'L' : 'O'); + sprintf(address, "%x%c", (unsigned int)obj, list_p ? 'L' : 'O'); DOH *placeholder = Getattr(print_circle_hash, address); if (placeholder) { Printv(out, placeholder, NIL); diff --git a/Source/Swig/symbol.c b/Source/Swig/symbol.c index a92a1d114..536be87d7 100644 --- a/Source/Swig/symbol.c +++ b/Source/Swig/symbol.c @@ -757,7 +757,7 @@ symbol_lookup_qualified(String_or_char *name, Symtab *symtab, String *prefix, in Node * Swig_symbol_clookup(String_or_char *name, Symtab *n) { - Hash *hsym; + Hash *hsym = 0; Node *s = 0; if (!n) { @@ -824,7 +824,7 @@ Swig_symbol_clookup(String_or_char *name, Symtab *n) { Node * Swig_symbol_clookup_check(String_or_char *name, Symtab *n, int (*checkfunc)(Node *n)) { - Hash *hsym; + Hash *hsym = 0; Node *s = 0; if (!n) {