mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-16 22:50:28 +01:00
device: add an initializer
Basically to silence gcc that is not smart enough to understand how does
.initialized and .value relate.
src/devices/nm-device.c: In function '_commit_mtu':
src/devices/nm-device.c:6754:15: error: 'ip6_mtu_sysctl.value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (ip6_mtu && ip6_mtu != _IP6_MTU_SYS ()) {
^
(cherry picked from commit 7ce805d49d)
This commit is contained in:
parent
ba414491b7
commit
de0df39646
1 changed files with 1 additions and 2 deletions
|
|
@ -6630,7 +6630,7 @@ _commit_mtu (NMDevice *self, const NMIP4Config *config)
|
|||
struct {
|
||||
gboolean initialized;
|
||||
guint32 value;
|
||||
} ip6_mtu_sysctl;
|
||||
} ip6_mtu_sysctl = { 0, };
|
||||
int ifindex;
|
||||
char sbuf[64], sbuf1[64], sbuf2[64];
|
||||
|
||||
|
|
@ -6729,7 +6729,6 @@ _commit_mtu (NMDevice *self, const NMIP4Config *config)
|
|||
ip6_mtu == ip6_mtu_orig ? "" : nm_sprintf_buf (sbuf2, " (was %u)", (guint) ip6_mtu_orig),
|
||||
ifindex);
|
||||
|
||||
ip6_mtu_sysctl.initialized = FALSE;
|
||||
#define _IP6_MTU_SYS() \
|
||||
({ \
|
||||
if (!ip6_mtu_sysctl.initialized) { \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue