From 4897829d0f13c16d73c2584bcdb106ec4c68e756 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 18 Oct 2004 01:50:46 +0000 Subject: [PATCH] allow overide the warn codes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6429 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Swig/error.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Swig/error.c b/Source/Swig/error.c index 8cee91861..05655a297 100644 --- a/Source/Swig/error.c +++ b/Source/Swig/error.c @@ -91,11 +91,12 @@ Swig_warning(int wnum, const String_or_char *filename, int line, const char *fmt if (filter) { char temp[32]; char *c; + char *f = Char(filter); sprintf(temp,"%d",wnum); - c = Strstr(filter,temp); - if (c) { + while(*f != '\0' && (c = strstr(f,temp))) { if (*(c-1) == '-') wrn = 0; /* Warning disabled */ if (*(c-1) == '+') wrn = 1; /* Warning enabled */ + f += strlen(temp); } } if (warnall || wrn) {