iwinfo: fix compilation error with GCC 12
authorChristian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Thu, 19 May 2022 12:45:13 +0000 (14:45 +0200)
committerChristian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Tue, 31 May 2022 17:44:26 +0000 (19:44 +0200)
commit1c4825739b3cf19fe429c19eafa82a7f27aa99b3
tree005b4ea3fcfde9cc83cf9d5712512c98a66864ed
parent909f2a04763dbc745488384b24281eca180452d6
iwinfo: fix compilation error with GCC 12

Fix compilation error with GCC 12.

In file included from /home/ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/libubus.h:23,
                 from iwinfo.c:21:
In function 'blobmsg_close_array',
    inlined from 'rpc_iwinfo_assoclist' at iwinfo.c:643:3:
/home/ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/libubox/blobmsg.h:250:9: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
  250 |         blob_nest_end(buf, cookie);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
iwinfo.c: In function 'rpc_iwinfo_assoclist':
iwinfo.c:564:15: note: 'c' was declared here
  564 |         void *c, *d, *e;
      |               ^
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.

Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
iwinfo.c