lua: fix error handling

scan-build from clang version 9 has reported following issues:

 uci.c:389:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:393:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_NOTFOUND;
                ^     ~~~~~~~~~~~~~~~~
 uci.c:417:4: warning: Value stored to 'err' is never read
                        err = UCI_ERR_INVAL;
                        ^     ~~~~~~~~~~~~~
 uci.c:524:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:533:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:565:4: warning: Value stored to 'err' is never read
                        err = UCI_ERR_INVAL;
                        ^     ~~~~~~~~~~~~~
 uci.c:575:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:584:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:642:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:651:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~

Signed-off-by: Petr Štetiar <[email protected]>
5 jobs for wip in 2 minutes and 37 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
failed #343232806
build with Atheros ATH79 SDK (out of tree)

00:02:37

failed #343232807
build with Freescale i.MX 6 SDK (out of tree)

00:02:13

failed #343232808
build with MIPS Malta CoreLV BE SDK (out of tree)

00:02:17

failed #343232809
build with Marvell Armada Cortex A-53 SDK (out of tree)

00:02:22

failed #343232805
various native checks

00:02:07

 
Name Stage Failure
failed
build with MIPS Malta CoreLV BE SDK (out of tree) Test
cc1: all warnings being treated as errors
make[3]: *** [CMakeFiles/uci.dir/build.make:63: CMakeFiles/uci.dir/libuci.c.o] Error 1
make[3]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[2]: *** [CMakeFiles/Makefile2:84: CMakeFiles/uci.dir/all] Error 2
make[2]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make: *** [openwrt-ci/sdk-build.mk:57: ci-sdk-oot-build] Error 2
ERROR: Job failed: exit code 1
failed
build with Atheros ATH79 SDK (out of tree) Test
cc1: all warnings being treated as errors
make[3]: *** [CMakeFiles/uci.dir/build.make:63: CMakeFiles/uci.dir/libuci.c.o] Error 1
make[3]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[2]: *** [CMakeFiles/Makefile2:84: CMakeFiles/uci.dir/all] Error 2
make[2]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make: *** [openwrt-ci/sdk-build.mk:57: ci-sdk-oot-build] Error 2
ERROR: Job failed: exit code 1
failed
various native checks Test
make[1]: *** [Makefile:141: all] Error 2
make[1]: Leaving directory '/builds/ynezz/openwrt-uci/build'
scan-build: Removing directory '/builds/ynezz/openwrt-uci/build/scan/2019-11-06-120644-164-1' because it contains no reports.
scan-build: No bugs found.
make: *** [openwrt-ci/native-build.mk:5: ci-native-scan-build] Error 2
Uploading artifacts...
build/scan: found 1 matching files
Uploading artifacts to coordinator... ok
id=343232805 responseStatus=201 Created token=cgq4RpFj
ERROR: Job failed: exit code 1
failed
build with Freescale i.MX 6 SDK (out of tree) Test
cc1: all warnings being treated as errors
make[3]: *** [CMakeFiles/uci.dir/build.make:63: CMakeFiles/uci.dir/libuci.c.o] Error 1
make[3]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[2]: *** [CMakeFiles/Makefile2:84: CMakeFiles/uci.dir/all] Error 2
make[2]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make: *** [openwrt-ci/sdk-build.mk:57: ci-sdk-oot-build] Error 2
ERROR: Job failed: exit code 1
failed
build with Marvell Armada Cortex A-53 SDK (out of tree) Test
cc1: all warnings being treated as errors
make[3]: *** [CMakeFiles/uci.dir/build.make:63: CMakeFiles/uci.dir/libuci.c.o] Error 1
make[3]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[2]: *** [CMakeFiles/Makefile2:84: CMakeFiles/uci.dir/all] Error 2
make[2]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/builds/ynezz/openwrt-uci/build'
make: *** [openwrt-ci/sdk-build.mk:57: ci-sdk-oot-build] Error 2
ERROR: Job failed: exit code 1