Skip to content

-Wsometimes-uninitialized in net/netfilter/nf_flow_table_offload.c #780

@nathanchance

Description

@nathanchance
../net/netfilter/nf_flow_table_offload.c:342:2: warning: variable 'offset' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
        default:
        ^~~~~~~
../net/netfilter/nf_flow_table_offload.c:346:57: note: uninitialized use occurs here
        flow_offload_mangle(entry, flow_offload_l4proto(flow), offset,
                                                               ^~~~~~
../net/netfilter/nf_flow_table_offload.c:331:12: note: initialize the variable 'offset' to silence this warning
        u32 offset;
                  ^
                   = 0
../net/netfilter/nf_flow_table_offload.c:369:2: warning: variable 'offset' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
        default:
        ^~~~~~~
../net/netfilter/nf_flow_table_offload.c:373:57: note: uninitialized use occurs here
        flow_offload_mangle(entry, flow_offload_l4proto(flow), offset,
                                                               ^~~~~~
../net/netfilter/nf_flow_table_offload.c:358:12: note: initialize the variable 'offset' to silence this warning
        u32 offset;
                  ^
                   = 0
2 warnings generated.

Patch submitted: https://lore.kernel.org/netfilter-devel/20191126201226.51857-1-natechancellor@gmail.com/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions