mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
BUILD: init: avoid a build warning on FreeBSD with USE_PROCCTL
It was brought by a variable declared after some statements in commit 21185970c ("MINOR: proc: setting the process to produce a core dump on FreeBSD."). It's worth noting that some versions of clang seem to ignore -Wdeclaration-after-statement by default. No backport is needed.
This commit is contained in:
parent
de361ad22e
commit
28345c6652
@ -3384,10 +3384,12 @@ int main(int argc, char **argv)
|
|||||||
ha_warning("[%s.main()] Failed to set the dumpable flag, "
|
ha_warning("[%s.main()] Failed to set the dumpable flag, "
|
||||||
"no core will be dumped.\n", argv[0]);
|
"no core will be dumped.\n", argv[0]);
|
||||||
#elif defined(USE_PROCCTL)
|
#elif defined(USE_PROCCTL)
|
||||||
int traceable = PROC_TRACE_CTL_ENABLE;
|
{
|
||||||
if (procctl(P_PID, getpid(), PROC_TRACE_CTL, &traceable) == -1)
|
int traceable = PROC_TRACE_CTL_ENABLE;
|
||||||
ha_warning("[%s.main()] Failed to set the traceable flag, "
|
if (procctl(P_PID, getpid(), PROC_TRACE_CTL, &traceable) == -1)
|
||||||
"no core will be dumped.\n", argv[0]);
|
ha_warning("[%s.main()] Failed to set the traceable flag, "
|
||||||
|
"no core will be dumped.\n", argv[0]);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user