diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-04-10 19:38:54 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-04-10 19:38:54 +0100 |
commit | 196751ce95fa6b6566a5b336193681fad3581fd1 (patch) | |
tree | 5f4c47b8b7099513f34f6219abccb437b8656cb9 /src/util/einfo.c | |
parent | 96a8c70a0cf4eadad8e306618f76177d0e8ea52d (diff) | |
download | ipxe-196751ce95fa6b6566a5b336193681fad3581fd1.zip ipxe-196751ce95fa6b6566a5b336193681fad3581fd1.tar.gz ipxe-196751ce95fa6b6566a5b336193681fad3581fd1.tar.bz2 |
[build] Enable warnings when building utilities
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util/einfo.c')
-rw-r--r-- | src/util/einfo.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/util/einfo.c b/src/util/einfo.c index 06736f2..15f920d 100644 --- a/src/util/einfo.c +++ b/src/util/einfo.c @@ -20,6 +20,7 @@ #include <stdint.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h> @@ -49,7 +50,8 @@ struct einfo { * @v infile Filename * @v opts Command-line options */ -static void einfo ( const char *infile, struct options *opts ) { +static void einfo ( const char *infile, + struct options *opts __attribute__ (( unused )) ) { int fd; struct stat stat; size_t len; @@ -85,9 +87,9 @@ static void einfo ( const char *infile, struct options *opts ) { for ( einfo = start ; ( ( void * ) einfo ) < ( start + len ) ; einfo = ( ( ( void * ) einfo ) + einfo->size ) ) { printf ( "%08x\t%s\t%d\t%s\n", einfo->error, - ( ( ( void * ) einfo ) + einfo->file ), + ( ( ( char * ) einfo ) + einfo->file ), einfo->line, - ( ( ( void * ) einfo ) + einfo->desc ) ); + ( ( ( char * ) einfo ) + einfo->desc ) ); } } @@ -115,8 +117,7 @@ static void print_help ( const char *program_name ) { * @v opts Options structure to populate */ static int parse_options ( const int argc, char **argv, - struct options *opts ) { - char *end; + struct options *opts __attribute__ (( unused )) ) { int c; while (1) { @@ -147,7 +148,7 @@ static int parse_options ( const int argc, char **argv, int main ( int argc, char **argv ) { struct options opts = { }; - unsigned int infile_index; + int infile_index; const char *infile; /* Parse command-line arguments */ |