Initialise _v to 0 in typecheck case
This avoids using _v uninitialised if there's an empty typecheck typemap, such as the dummy one we have for std::initializer_list. Fixes GCC warning on cpp11_initializer_list testcase when compiled with -O2.
This commit is contained in:
parent
3912c572ff
commit
5ec65fde0a
2 changed files with 6 additions and 1 deletions
|
|
@ -809,7 +809,7 @@ String *Swig_overload_dispatch(Node *n, const_String_or_char_ptr fmt, int *maxar
|
|||
}
|
||||
|
||||
if (num_arguments) {
|
||||
Printf(f, "int _v;\n");
|
||||
Printf(f, "int _v = 0;\n");
|
||||
}
|
||||
|
||||
int num_braces = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue