aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-07-19 16:10:35 +0200
committerPetr Štetiar <ynezz@true.cz>2019-07-19 16:15:25 +0200
commit83e60f0df6e1f80011d454103fd4156d27dc7d98 (patch)
treeb622105113b5395a1fcc007a9fd95a33728a1818 /tools/firmware-utils/src
parent9c0c1c44013003616e2f5c55c062430dbda3cce5 (diff)
downloadupstream-83e60f0df6e1f80011d454103fd4156d27dc7d98.tar.gz
upstream-83e60f0df6e1f80011d454103fd4156d27dc7d98.tar.bz2
upstream-83e60f0df6e1f80011d454103fd4156d27dc7d98.zip
firmware-utils: mkfwimage: enable extra compiler checks and fix them
Let's enforce additional automatic checks enforced by the compiler in order to catch possible errors during compilation. Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/mkfwimage.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
index 2b84d3db53..c919a2a131 100644
--- a/tools/firmware-utils/src/mkfwimage.c
+++ b/tools/firmware-utils/src/mkfwimage.c
@@ -262,7 +262,8 @@ static void usage(const char* progname)
static void print_image_info(const image_info_t* im)
{
- int i = 0;
+ unsigned int i = 0;
+
INFO("Firmware version: '%s'\n"
"Output file: '%s'\n"
"Part count: %u\n",
@@ -279,8 +280,6 @@ static void print_image_info(const image_info_t* im)
}
}
-
-
static u_int32_t filelength(const char* file)
{
FILE *p;
@@ -336,7 +335,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
*/
static int validate_image_layout(image_info_t* im)
{
- int i;
+ unsigned int i;
if (im->part_count == 0 || im->part_count > MAX_SECTIONS)
{
@@ -383,7 +382,7 @@ static int build_image(image_info_t* im)
char* ptr;
u_int32_t mem_size;
FILE* f;
- int i;
+ unsigned int i;
// build in-memory buffer
mem_size = sizeof(header_t);