]> 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)
commit178b6e8da07eb0f32658dee463f615b787522328
tree39018d7e473509138778d0391f2de9bf0890eda9
parent444bc87191dd6d7e0bf48b43eeacc2248ec17c44
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