Commit 3ab712a
dpdk: Avoid maybe uninitialized for found_value variable.
The GCC with -O1 -fno-omit-frame-pointer -fno-common started to report
the following warning:
In function 'construct_dpdk_mutex_options',
inlined from 'construct_dpdk_args' at lib/dpdk.c:238:5,
inlined from 'dpdk_init__' at lib/dpdk.c:393:5,
inlined from 'dpdk_init' at lib/dpdk.c:534:23:
lib/dpdk.c:220:13: error: 'found_value' may be used uninitialized [-Werror=maybe-uninitialized]
220 | svec_add(args, found_value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dpdk.c: In function 'dpdk_init':
lib/dpdk.c:189:21: note: 'found_value' was declared here
189 | const char *found_value;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
Assign NULL to the variable to avoid this warning.
Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>1 parent 2b37693 commit 3ab712a
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
0 commit comments