apache
Macro used as an actual parameter leads to compile error if the macro is not defined
Function apr_signal_block takes an int as a parameter. If SIGPIPE is not defined, then the compilation breaks as SIGPIPE is not defined as a macro anywhere in the code.
Bug fixed by commit 1f46088b38d
Type | UndeclaredIdentifier |
Config | "!SIGPIPE" (1st degree) |
Fix-in | mapping |
Location | support/ |
#include <stdio.h> #ifdef SIGPIPE #define SIGPIPE 1 #endif void apr_signal_block(int signal) { printf("%d\n", signal); } int main(void) { apr_signal_block(SIGPIPE); // ERROR: SIGPIPE undeclared return 0; }
diff --git a/apache/simple/1f46088.c b/apache/simple/1f46088.c --- a/apache/simple/1f46088.c +++ b/apache/simple/1f46088.c @@ -11,6 +11,8 @@ void apr_signal_block(int signal) int main(void) { +#ifdef SIGPIPE apr_signal_block(SIGPIPE); // ERROR: SIGPIPE undeclared +#endif return 0; }
. ERROR firehose.c:681:apr_signal_block(SIGPIPE);