gcc -Wall warnings fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4426 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
02c3bf10b0
commit
6116a681bc
8 changed files with 16 additions and 24 deletions
|
|
@ -4143,7 +4143,7 @@ definetype : { /* scanner_check_typedef(); */ } expr {
|
|||
}
|
||||
$$.type = T_CHAR;
|
||||
$$.bitfield = 0;
|
||||
$$.throws;
|
||||
$$.throws = 0;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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"))) {
|
||||
|
|
|
|||
|
|
@ -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"))) {
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue