mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 14:51:27 +02:00
BUILD: debug: silence warning on gcc-5
In 2.6, 8a0fd3a36 ("BUILD: debug: work around gcc-12 excessive -Warray-bounds warnings") disabled some warnings that were reported around the the BUG() statement. But the -Wnull-dereference warning isn't known from gcc-5, it only arrived in gcc-6, hence makes gcc-5 complain loudly that it doesn't know this directive. Let's just condition this one to gcc-6.
This commit is contained in:
parent
0d023774bf
commit
481edaceb8
@ -45,7 +45,9 @@ static inline __attribute((always_inline)) void ha_crash_now(void)
|
|||||||
#if __GNUC_PREREQ__(5, 0)
|
#if __GNUC_PREREQ__(5, 0)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
|
#if __GNUC_PREREQ__(6, 0)
|
||||||
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
*(volatile char *)1 = 0;
|
*(volatile char *)1 = 0;
|
||||||
#if __GNUC_PREREQ__(5, 0)
|
#if __GNUC_PREREQ__(5, 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user