aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-03-25 14:55:27 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-03-28 20:50:39 +0200
commit979cffd3bfdbdf6e5316d6dbf400d7480a7121ed (patch)
tree2866d573de57a3914a6db363dcedf85a79399b18 /tools
parent2195f0c7dbfbf556071c44ed9565288c3978b6b9 (diff)
downloadhardware_replicant_libsamsung-ipc-979cffd3bfdbdf6e5316d6dbf400d7480a7121ed.tar.gz
hardware_replicant_libsamsung-ipc-979cffd3bfdbdf6e5316d6dbf400d7480a7121ed.tar.bz2
hardware_replicant_libsamsung-ipc-979cffd3bfdbdf6e5316d6dbf400d7480a7121ed.zip
tools: nv_data_imei: get rid of missing initializer warning
Without that fix, we have the following warnings on Replicant 6.0: hardware/replicant/libsamsung-ipc/tools/nv_data-imei.c:245:2: warning: missing initializer for field 'option' of 'struct command_option' [-Wmissing-field-initializers] { /* Sentinel */ }, ^ In file included from hardware/replicant/libsamsung-ipc/tools/nv_data-imei.c:39:0: hardware/replicant/libsamsung-ipc/tools/nv_data-imei.h:65:10: note: 'option' declared here uint8_t option; ^ hardware/replicant/libsamsung-ipc/tools/nv_data-imei.c:277:2: warning: missing initializer for field 'name' of 'struct command' [-Wmissing-field-initializers] { /* Sentinel */ }, ^ In file included from hardware/replicant/libsamsung-ipc/tools/nv_data-imei.c:39:0: hardware/replicant/libsamsung-ipc/tools/nv_data-imei.h:57:14: note: 'name' declared here const char *name; ^ Note that even if the code isn't valid C17 code, the warning is harmless since the arrays of struct is declared outside functions (static storage duration), so the "Sentinel" will be filled with zeros anyway. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/nv_data-imei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/nv_data-imei.c b/tools/nv_data-imei.c
index c5301b7..63b1cb8 100644
--- a/tools/nv_data-imei.c
+++ b/tools/nv_data-imei.c
@@ -242,7 +242,7 @@ static struct command_option commands_options[] = {
"--imei=355921041234567",
get_imei,
},
- { /* Sentinel */ },
+ { 0 },
};
static struct command commands[] = {
@@ -274,7 +274,7 @@ static struct command commands[] = {
OPTION_FILE|OPTION_IMEI,
bruteforce_imei_offset,
},
- { /* Sentinel */ },
+ { 0 },
};
#if DEBUG