commands-nas: fix gcc warning
authorAlexander Couzens <lynxis@fe80.eu>
Sun, 1 Oct 2023 16:28:10 +0000 (18:28 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Sat, 9 Mar 2024 20:15:21 +0000 (21:15 +0100)
The compiler still thinks c could be initialized.
Even this can't happen, assign it to NULL to silence
the warning.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
commands-nas.c

index 476cd61fedc1871c7f5b3f1176cd8a26dff91cad..9c0a626adce3a17d7735ce8d477509bdb48c66c5 100644 (file)
@@ -710,7 +710,7 @@ static void
 cmd_nas_get_cell_location_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
 {
        struct qmi_nas_get_cell_location_info_response res;
-       void *c, *t, *cell, *freq;
+       void *c = NULL, *t, *cell, *freq;
        int i, j;
 
        qmi_parse_nas_get_cell_location_info_response(msg, &res);