Browse code

core: cfg.lex - removed __attribute__((unused))

- not supported on some distros
- workaround to avoid unused warning

Daniel-Constantin Mierla authored on 09/02/2021 20:16:52
Showing 1 changed files
... ...
@@ -42,7 +42,6 @@
42 42
 	#include "daemonize.h"
43 43
 	#include "ppcfg.h"
44 44
 
45
-	static void yynoreturn yy_fatal_error ( const char* msg ) __attribute__((unused));
46 45
 	static void yynoreturn ksr_yy_fatal_error(const char* msg);
47 46
 	#define YY_FATAL_ERROR(msg) ksr_yy_fatal_error(msg);
48 47
 
... ...
@@ -2170,6 +2169,10 @@ static void pp_endif()
2170 2169
 
2171 2170
 static void yynoreturn ksr_yy_fatal_error(const char* msg)
2172 2171
 {
2172
+	if(ksr_atexit_mode==1) {
2173
+		yy_fatal_error(msg);
2174
+	}
2175
+
2173 2176
 	fprintf( stderr, "%s\n", msg );
2174
-	ksr_exit( YY_EXIT_FAILURE );
2177
+	_exit( YY_EXIT_FAILURE );
2175 2178
 }