Browse code

core: improve error message related to a mismatch of #!ifdef/#!define statement

Henning Westerholt authored on 06/09/2019 09:37:44
Showing 1 changed files
... ...
@@ -219,8 +219,13 @@ void pp_ifdef_level_update(int val)
219 219
 void pp_ifdef_level_check(void)
220 220
 {
221 221
 	if(_pp_ifdef_level!=0) {
222
-		LM_WARN("different number of preprocessor directives:"
223
-				" N(#!IF[N]DEF) - N(#!ENDIF) = %d\n", _pp_ifdef_level);
222
+		if (_pp_ifdef_level > 0) {
223
+	                LM_WARN("different number of preprocessor directives:"
224
+				" %d more #!if[n]def as #!endif\n", _pp_ifdef_level);
225
+		} else {
226
+			LM_WARN("different number of preprocessor directives:"
227
+				" %d more #!endif as #!if[n]def\n", (_pp_ifdef_level)*-1);
228
+		}
224 229
 	} else {
225 230
 		LM_DBG("same number of pairing preprocessor directives"
226 231
 			" #!IF[N]DEF - #!ENDIF\n");