From 04cb651376f94388a5a7c2c9a983553f8b909824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Fri, 19 Jul 2019 21:34:16 +0200 Subject: firmware-utils: mkfwimage: fix more errors reported by gcc-6/7/9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/mkfwimage.c:276:8: error: format '%lld' expects argument of type 'long long int', but argument 4 has type '__off_t' {aka 'const long int'} [-Werror=format=] src/fw.h:71:36: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__off_t' {aka 'long int'} [-Werror=format=] inlined from 'main' at src/mkfwimage.c:543:12: /string_fortified.h:106:10: error: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation] inlined from 'write_part' at src/mkfwimage.c:235:2, string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation] inlined from 'main' at src/mkfwimage.c:477:5: string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 256 equals destination size [-Werror=stringop-truncation] inlined from 'main' at src/mkfwimage.c:496:5: string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] inlined from 'main' at src/mkfwimage.c:481:5: string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] inlined from 'main' at src/mkfwimage.c:485:5: string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation] Runtested on ath79 and UBNT Bullet M XW. Signed-off-by: Petr Štetiar --- tools/firmware-utils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/firmware-utils/Makefile') diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index eca4dd7da7..d318788ac5 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -38,7 +38,7 @@ define Host/Compile $(call cc,mkzynfw) $(call cc,lzma2eva,-lz) $(call cc,mkcasfw) - $(call cc,mkfwimage,-lz -Wall -Werror -Wextra) + $(call cc,mkfwimage,-lz -Wall -Werror -Wextra -D_FILE_OFFSET_BITS=64) $(call cc,mkfwimage2,-lz) $(call cc,imagetag imagetag_cmdline cyg_crc32) $(call cc,add_header) -- cgit v1.2.3