../drivers/net/ovpn/peer.c:152:6: warning: variable 'ip_len' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 152 | if (local_ip) { | ^~~~~~~~ ../drivers/net/ovpn/peer.c:166:33: note: uninitialized use occurs here 166 | memcpy(&bind->local, local_ip, ip_len); | ^~~~~~ ../include/linux/fortify-string.h:690:53: note: expanded from macro 'memcpy' 690 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^ ../include/linux/fortify-string.h:627:41: note: expanded from macro '__fortify_memcpy_chk' 627 | const size_t __fortify_size = (size_t)(size); \ | ^~~~ ../drivers/net/ovpn/peer.c:152:2: note: remove the 'if' if its condition is always true 152 | if (local_ip) { | ^~~~~~~~~~~~~ ../drivers/net/ovpn/peer.c:143:15: note: initialize the variable 'ip_len' to silence this warning 143 | size_t ip_len; | ^ | = 0 1 warning generated. New errors added --- /tmp/tmp.QX5FMQpTlc 2025-03-11 08:30:54.253230100 -0700 +++ /tmp/tmp.1Smguvb4UY 2025-03-11 08:32:07.127501167 -0700 @@ -0,0 +1,20 @@ +../drivers/net/ovpn/peer.c:152:6: warning: variable 'ip_len' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] + 152 | if (local_ip) { + | ^~~~~~~~ +../drivers/net/ovpn/peer.c:166:33: note: uninitialized use occurs here + 166 | memcpy(&bind->local, local_ip, ip_len); + | ^~~~~~ +../include/linux/fortify-string.h:690:53: note: expanded from macro 'memcpy' + 690 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ + | ^ +../include/linux/fortify-string.h:627:41: note: expanded from macro '__fortify_memcpy_chk' + 627 | const size_t __fortify_size = (size_t)(size); \ + | ^~~~ +../drivers/net/ovpn/peer.c:152:2: note: remove the 'if' if its condition is always true + 152 | if (local_ip) { + | ^~~~~~~~~~~~~ +../drivers/net/ovpn/peer.c:143:15: note: initialize the variable 'ip_len' to silence this warning + 143 | size_t ip_len; + | ^ + | = 0 +1 warning generated. Per-file breakdown --- /tmp/tmp.AfQy7SKumW 2025-03-11 08:32:07.134501097 -0700 +++ /tmp/tmp.Cpupjvq5oX 2025-03-11 08:32:07.137501067 -0700 @@ -0,0 +1 @@ + 2 ../drivers/net/ovpn/peer.c