Fix few unused variable warnings

This commit is contained in:
Michel Zou 2021-03-06 08:20:27 +01:00 committed by William S Fulton
commit ee8d47cec4
6 changed files with 12 additions and 0 deletions

View file

@ -839,6 +839,7 @@ Node *Swig_cparse_template_locate(String *name, Parm *tparms, Symtab *tscope) {
String *nodeType = nodeType(n);
int isclass = 0;
assert(Equal(nodeType, "template"));
(void)nodeType;
isclass = (Equal(Getattr(n, "templatetype"), "class"));
if (!isclass) {
/* If not a templated class we must have a templated function.

View file

@ -64,6 +64,7 @@ static void open_files_list_remove(DohFile *f) {
}
Delete(sf);
assert(removed);
(void)removed;
}
/* -----------------------------------------------------------------------------
@ -80,6 +81,7 @@ void DohCloseAllOpenFiles() {
DOHString *sf = Getitem(all_open_files, i);
int check = sscanf(Char(sf), "%p", (void **)&f);
assert(check == 1);
(void)check;
if (f->closeondel) {
if (f->filep) {
check = fclose(f->filep);

View file

@ -4115,6 +4115,7 @@ private:
String *name = Getattr(n, "sym:name");
if (!name) {
assert(is_ignored);
(void)is_ignored;
name = Getattr(n, "name");
}
@ -6085,6 +6086,7 @@ private:
}
bool r = addSymbol(name, n, scope) ? true : false;
assert(r);
(void)r;
return true;
}

View file

@ -1002,6 +1002,7 @@ public:
// REPORT("variableWrapper", n);
String *lua_name = Getattr(n, "lua:name");
assert(lua_name);
(void)lua_name;
current[VARIABLE] = true;
// let SWIG generate the wrappers
int result = Language::variableWrapper(n);

View file

@ -4875,6 +4875,7 @@ public:
String *classname = Swig_class_name(parent);
String *rclassname = Swig_class_name(getCurrentClass());
assert(rclassname);
(void)rclassname;
String *parms = make_pyParmList(n, true, false, allow_kwargs);
/* Pass 'self' only if using director */

View file

@ -404,6 +404,7 @@ SwigType *SwigType_del_reference(SwigType *t) {
char *c = Char(t);
int check = strncmp(c, "r.", 2);
assert(check == 0);
(void)check;
Delslice(t, 0, 2);
return t;
}
@ -439,6 +440,7 @@ SwigType *SwigType_del_rvalue_reference(SwigType *t) {
char *c = Char(t);
int check = strncmp(c, "z.", 2);
assert(check == 0);
(void)check;
Delslice(t, 0, 2);
return t;
}
@ -529,6 +531,7 @@ SwigType *SwigType_del_qualifier(SwigType *t) {
char *c = Char(t);
int check = strncmp(c, "q(", 2);
assert(check == 0);
(void)check;
Delslice(t, 0, element_size(c));
return t;
}
@ -597,6 +600,7 @@ SwigType *SwigType_del_memberpointer(SwigType *t) {
char *c = Char(t);
int check = strncmp(c, "m(", 2);
assert(check == 0);
(void)check;
Delslice(t, 0, element_size(c));
return t;
}
@ -641,6 +645,7 @@ SwigType *SwigType_del_array(SwigType *t) {
char *c = Char(t);
int check = strncmp(c, "a(", 2);
assert(check == 0);
(void)check;
Delslice(t, 0, element_size(c));
return t;
}