mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-27 14:49:55 +00:00
26 lines
718 B
Diff
26 lines
718 B
Diff
|
From: Florian Fainelli <f.fainelli@gmail.com>
|
||
|
To: netdev@vger.kernel.org
|
||
|
Subject: [PATCH ethtool v2 2/3] netlink: Fix maybe uninitialized 'meters' variable
|
||
|
Date: Sat, 14 Jan 2023 08:34:10 -0800
|
||
|
|
||
|
GCC12 warns that 'meters' may be uninitialized, initialize it
|
||
|
accordingly.
|
||
|
|
||
|
Fixes: 9561db9b76f4 ("Add cable test TDR support")
|
||
|
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||
|
---
|
||
|
netlink/parser.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/netlink/parser.c
|
||
|
+++ b/netlink/parser.c
|
||
|
@@ -237,7 +237,7 @@ int nl_parse_direct_m2cm(struct nl_conte
|
||
|
struct nl_msg_buff *msgbuff, void *dest)
|
||
|
{
|
||
|
const char *arg = *nlctx->argp;
|
||
|
- float meters;
|
||
|
+ float meters = 0.0;
|
||
|
uint32_t cm;
|
||
|
int ret;
|
||
|
|