diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-07-19 21:34:16 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-07-19 22:11:15 +0200 |
commit | 04cb651376f94388a5a7c2c9a983553f8b909824 (patch) | |
tree | ec60781bf0b4fce0fd78f3f0847701b89d40b58c /tools/firmware-utils/src/fw.h | |
parent | 90b7dbf7d8acce9ab702d426f172f42c2033f330 (diff) | |
download | upstream-04cb651376f94388a5a7c2c9a983553f8b909824.tar.gz upstream-04cb651376f94388a5a7c2c9a983553f8b909824.tar.bz2 upstream-04cb651376f94388a5a7c2c9a983553f8b909824.zip |
firmware-utils: mkfwimage: fix more errors reported by gcc-6/7/9
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 <ynezz@true.cz>
Diffstat (limited to 'tools/firmware-utils/src/fw.h')
-rw-r--r-- | tools/firmware-utils/src/fw.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/fw.h b/tools/firmware-utils/src/fw.h index 44f8d851d2..53a92a573c 100644 --- a/tools/firmware-utils/src/fw.h +++ b/tools/firmware-utils/src/fw.h @@ -27,6 +27,7 @@ #define MAGIC_ENDS "ENDS" #define MAGIC_LENGTH 4 +#define PART_NAME_LENGTH 16 typedef struct header { char magic[MAGIC_LENGTH]; @@ -37,7 +38,7 @@ typedef struct header { typedef struct part { char magic[MAGIC_LENGTH]; - char name[16]; + char name[PART_NAME_LENGTH]; char pad[12]; u_int32_t memaddr; u_int32_t index; |