Remove set but not used variables
Highlighted by clang-15 warnings such as: warning: variable 'index' set but not used [-Wunused-but-set-variable]
This commit is contained in:
parent
6c4010e442
commit
f5e2d044df
6 changed files with 1 additions and 20 deletions
|
|
@ -97,7 +97,6 @@ String *Swig_director_declaration(Node *n) {
|
||||||
|
|
||||||
String *Swig_method_call(const_String_or_char_ptr name, ParmList *parms) {
|
String *Swig_method_call(const_String_or_char_ptr name, ParmList *parms) {
|
||||||
String *func;
|
String *func;
|
||||||
int i = 0;
|
|
||||||
int comma = 0;
|
int comma = 0;
|
||||||
Parm *p = parms;
|
Parm *p = parms;
|
||||||
SwigType *pt;
|
SwigType *pt;
|
||||||
|
|
@ -115,7 +114,6 @@ String *Swig_method_call(const_String_or_char_ptr name, ParmList *parms) {
|
||||||
pname = Getattr(p, "name");
|
pname = Getattr(p, "name");
|
||||||
Printf(func, "%s", pname);
|
Printf(func, "%s", pname);
|
||||||
comma = 1;
|
comma = 1;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1418,7 +1418,6 @@ public:
|
||||||
List *baselist = Getattr(n, "bases");
|
List *baselist = Getattr(n, "bases");
|
||||||
if (baselist && Len(baselist)) {
|
if (baselist && Len(baselist)) {
|
||||||
Iterator b;
|
Iterator b;
|
||||||
int index = 0;
|
|
||||||
b = First(baselist);
|
b = First(baselist);
|
||||||
while (b.item) {
|
while (b.item) {
|
||||||
String *bname = Getattr(b.item, "name");
|
String *bname = Getattr(b.item, "name");
|
||||||
|
|
@ -1431,7 +1430,6 @@ public:
|
||||||
Printf(base_class_names, "\"%s *\",", SwigType_namestr(bname));
|
Printf(base_class_names, "\"%s *\",", SwigType_namestr(bname));
|
||||||
|
|
||||||
b = Next(b);
|
b = Next(b);
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// First, print class static part
|
// First, print class static part
|
||||||
|
|
|
||||||
|
|
@ -1486,10 +1486,6 @@ public:
|
||||||
int i;
|
int i;
|
||||||
char source[256];
|
char source[256];
|
||||||
|
|
||||||
int outputs = 0;
|
|
||||||
if (!is_void)
|
|
||||||
outputs++;
|
|
||||||
|
|
||||||
/* build argument list and type conversion string */
|
/* build argument list and type conversion string */
|
||||||
for (i = 0, idx = 0, p = l; i < num_arguments; i++) {
|
for (i = 0, idx = 0, p = l; i < num_arguments; i++) {
|
||||||
|
|
||||||
|
|
@ -1497,9 +1493,6 @@ public:
|
||||||
p = Getattr(p, "tmap:ignore:next");
|
p = Getattr(p, "tmap:ignore:next");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Getattr(p, "tmap:directorargout") != 0)
|
|
||||||
outputs++;
|
|
||||||
|
|
||||||
String *pname = Getattr(p, "name");
|
String *pname = Getattr(p, "name");
|
||||||
String *ptype = Getattr(p, "type");
|
String *ptype = Getattr(p, "type");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1003,7 +1003,6 @@ public:
|
||||||
List *baselist = Getattr(n, "bases");
|
List *baselist = Getattr(n, "bases");
|
||||||
if (baselist && Len(baselist)) {
|
if (baselist && Len(baselist)) {
|
||||||
Iterator b;
|
Iterator b;
|
||||||
int index = 0;
|
|
||||||
b = First(baselist);
|
b = First(baselist);
|
||||||
while (b.item) {
|
while (b.item) {
|
||||||
String *bname = Getattr(b.item, "name");
|
String *bname = Getattr(b.item, "name");
|
||||||
|
|
@ -1016,7 +1015,6 @@ public:
|
||||||
Printf(base_class_names, "\"%s\",", bname_mangled);
|
Printf(base_class_names, "\"%s\",", bname_mangled);
|
||||||
Printf(base_class, "0,");
|
Printf(base_class, "0,");
|
||||||
b = Next(b);
|
b = Next(b);
|
||||||
index++;
|
|
||||||
Delete(bname_mangled);
|
Delete(bname_mangled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2167,10 +2167,6 @@ public:
|
||||||
|
|
||||||
Parm *p;
|
Parm *p;
|
||||||
|
|
||||||
int outputs = 0;
|
|
||||||
if (!is_void)
|
|
||||||
outputs++;
|
|
||||||
|
|
||||||
/* build argument list and type conversion string */
|
/* build argument list and type conversion string */
|
||||||
idx = 0;
|
idx = 0;
|
||||||
p = l;
|
p = l;
|
||||||
|
|
@ -2180,9 +2176,6 @@ public:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Getattr(p, "tmap:directorargout") != 0)
|
|
||||||
outputs++;
|
|
||||||
|
|
||||||
String *pname = Getattr(p, "name");
|
String *pname = Getattr(p, "name");
|
||||||
String *ptype = Getattr(p, "type");
|
String *ptype = Getattr(p, "type");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -825,6 +825,7 @@ public:
|
||||||
|
|
||||||
//Printf(f_init,"/* Register base : %s */\n", bmangle);
|
//Printf(f_init,"/* Register base : %s */\n", bmangle);
|
||||||
//Printf(f_init,"swig_%s_bases[%d] = (swig_class *) SWIG_TypeQuery(\"%s *\")->clientdata;\n", mangled_classname, index, SwigType_namestr(bname));
|
//Printf(f_init,"swig_%s_bases[%d] = (swig_class *) SWIG_TypeQuery(\"%s *\")->clientdata;\n", mangled_classname, index, SwigType_namestr(bname));
|
||||||
|
(void)index;
|
||||||
b = Next(b);
|
b = Next(b);
|
||||||
index++;
|
index++;
|
||||||
Putc(',', base_class);
|
Putc(',', base_class);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue