This was spotted by compiling nv_data-imei on Replicant 6: it gave
the following warning:
    hardware/replicant/libsamsung-ipc/tools/nv_data-imei.c:1062:15:
    warning: 'command' may be used uninitialized in this function
    [-Wmaybe-uninitialized]
       rc = command->func(nv_data_path, &offset);
                   ^

Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
 tools/nv_data-imei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/nv_data-imei.c b/tools/nv_data-imei.c
index 3ed335f..766c7a8 100644
--- a/tools/nv_data-imei.c
+++ b/tools/nv_data-imei.c
@@ -843,8 +843,8 @@ int main(int argc, char * const argv[])
        opterr = 0;
        struct imei imei;
        struct offset offset;
-       struct command *command;
-       struct command_option *option;
+       struct command *command = NULL;
+       struct command_option *option = NULL;
        char *nv_data_path;
        int c, rc;
 
-- 
2.30.1

_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to