]> git.baikalelectronics.ru Git - kernel.git/commit
net: mpls: Fix GCC 12 warning
authorVictor Erminpour <victor.erminpour@oracle.com>
Thu, 10 Feb 2022 00:28:38 +0000 (16:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Feb 2022 15:29:39 +0000 (15:29 +0000)
commitc4416f5c2eb3ed48dfba265e628a6e52da962f03
tree39018d7e473509138778d0391f2de9bf0890eda9
parent9ccc6e0c8959a019bb40f6b18704b142c04b19a8
net: mpls: Fix GCC 12 warning

When building with automatic stack variable initialization, GCC 12
complains about variables defined outside of switch case statements.
Move the variable outside the switch, which silences the warning:

./net/mpls/af_mpls.c:1624:21: error: statement will never be executed [-Werror=switch-unreachable]
  1624 |                 int err;
       |                     ^~~

Signed-off-by: Victor Erminpour <victor.erminpour@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c