system: fix uninitialized variables in firmware validation code
authorRafał Miłecki <rafal@milecki.pl>
Thu, 5 Sep 2019 21:07:21 +0000 (23:07 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 5 Sep 2019 21:07:21 +0000 (23:07 +0200)
commit0bcbbbf1abf76bf3aa8af5657308cac61f7de602
treea0ee20fa248d709638c234f3d6a332d2bc0d6a98
parent34ac88cb873ad81f1510e2207c34b6abaa1ae16a
system: fix uninitialized variables in firmware validation code

This fixes:
system.c: In function 'validate_firmware_image':
system.c:403:6: error: 'fd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (fd >= 0) {
      ^
system.c:446:4: error: 'jsobj' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    blobmsg_add_object(&b, jsobj);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: e990e215e8a3 ("system: add "validate_firmware_image" ubus method")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
system.c