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>
This commit is contained in:
Petr Štetiar
2019-07-19 16:10:35 +02:00
parent 9c0c1c4401
commit 83e60f0df6
2 changed files with 12 additions and 7 deletions

View File

@@ -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);