mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-14 14:30:36 +01:00
glib-aux: restrict NM_PRAGMA_WARNING_DISABLE_DANGLING_POINTER workaround to gcc 12.0.1
This was a bug in gcc 12 (<= 12.0.1). Restrict the macro further for when we disable the warning. See-also: https://bugzilla.redhat.com/show_bug.cgi?id=2056613
This commit is contained in:
parent
1d6080827b
commit
45d2537116
1 changed files with 3 additions and 4 deletions
|
|
@ -203,10 +203,9 @@ _nm_auto_freev(gpointer ptr)
|
|||
/*****************************************************************************/
|
||||
|
||||
/* Seems gcc-12 has a tendency for false-positive -Wdangling-pointer warnings with
|
||||
* g_error()'s `for(;;);`.
|
||||
*
|
||||
* Work around that, but it's only for gcc 12 (for now). */
|
||||
#if defined(__GNUC__) && __GNUC__ == 12
|
||||
* g_error()'s `for(;;);`. See https://bugzilla.redhat.com/show_bug.cgi?id=2056613 .
|
||||
* Work around, but only for the affected gcc 12.0.1. */
|
||||
#if defined(__GNUC__) && __GNUC__ == 12 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ <= 1
|
||||
#define NM_PRAGMA_WARNING_DISABLE_DANGLING_POINTER NM_PRAGMA_WARNING_DISABLE("-Wdangling-pointer")
|
||||
#else
|
||||
#define NM_PRAGMA_WARNING_DISABLE_DANGLING_POINTER NM_PRAGMA_DIAGNOSTICS_PUSH
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue