new -Werror option and fixes for turning on warnings which are normally turned off

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9922 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-08-31 22:20:21 +00:00
commit 87577ab5e6
4 changed files with 105 additions and 34 deletions

View file

@ -89,10 +89,14 @@ void Swig_warning(int wnum, const String_or_char *filename, int line, const char
char *f = Char(filter);
sprintf(temp, "%d", wnum);
while (*f != '\0' && (c = strstr(f, temp))) {
if (*(c - 1) == '-')
if (*(c - 1) == '-') {
wrn = 0; /* Warning disabled */
if (*(c - 1) == '+')
break;
}
if (*(c - 1) == '+') {
wrn = 1; /* Warning enabled */
break;
}
f += strlen(temp);
}
}
@ -170,7 +174,6 @@ void Swig_warnfilter(const String_or_char *wlist, int add) {
char *c;
char *cw;
String *s;
if (!filter)
filter = NewStringEmpty();