firmware-utils: tplink-safeloader: fix compiler warnings/errors
authorPetr Štetiar <ynezz@true.cz>
Sat, 20 Jul 2019 12:21:28 +0000 (14:21 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 23 Jul 2019 20:07:23 +0000 (22:07 +0200)
commit5df9cffd09e15cc496b75b0d2f328d50c0f8347c
tree1fdb0fb45758228873d644137fbebde5493bacfa
parent483a1f0ac646fc0927123f37909e943eb4e5bed1
firmware-utils: tplink-safeloader: fix compiler warnings/errors

tplink-safeloader.c:1647:5: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else]
tplink-safeloader.c:2003:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
tplink-safeloader.c:2010:10: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
tplink-safeloader.c:2054:32: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2145:46: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2148:48: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2154:41: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2156:43: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2209:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
tplink-safeloader.c:2225:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
tplink-safeloader.c:2242:48: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2247:13: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
tplink-safeloader.c:2249:43: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
tplink-safeloader.c:2054:6: error: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Werror=unused-result]
tplink-safeloader.c:2145:7: error: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Werror=unused-result]
tplink-safeloader.c:2154:7: error: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Werror=unused-result]

Signed-off-by: Petr Štetiar <ynezz@true.cz>
tools/firmware-utils/src/tplink-safeloader.c