Fix compiler warnings
- implicit declaration of built-in function 'strncpy' - control reaches end of non-void function - assignment to 'void (*)(int, siginfo_t *, void *)' from incompatible pointer type 'void (*)(int)'
This commit is contained in:
parent
a42d795002
commit
f689c4ec15
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "jsonlogger.h"
|
#include "jsonlogger.h"
|
||||||
|
|
||||||
|
@ -81,6 +82,8 @@ static bool dump_var_array_cf(const var_array_cf_t *varray)
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_OR_RETURN("]");
|
LOG_OR_RETURN("]");
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,10 @@ int main()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore SIGPIPE
|
// ignore SIGPIPE
|
||||||
term_action.sa_sigaction = SIG_IGN;
|
struct sigaction term_action_ign = {
|
||||||
|
.sa_handler = SIG_IGN,
|
||||||
if(sigaction(SIGPIPE, &term_action, NULL) < 0) {
|
};
|
||||||
|
if(sigaction(SIGPIPE, &term_action_ign, NULL) < 0) {
|
||||||
perror("sigaction");
|
perror("sigaction");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue