From 07a87aa599a8fc32e938d9987bd2b59eebcfcb76 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Mon, 26 Jul 2010 11:37:19 -0700 Subject: mtd-utils: clean up compile warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc 4.4.3 on x86_64: libcrc32.c:42: warning: ‘static’ is not at beginning of declaration libfec.c:120: warning: initialization discards qualifiers from pointer target type libfec.c:121: warning: initialization discards qualifiers from pointer target type libfec.c:417: warning: passing argument 2 of ‘my_malloc’ discards qualifiers from pointer target type recv_image.c:164: warning: comparison of unsigned expression < 0 is always false recv_image.c:170: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’ recv_image.c:170: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’ And many more along the same lines. Signed-off-by: Kevin Cernekee Signed-off-by: Artem Bityutskiy --- sumtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sumtool.c') diff --git a/sumtool.c b/sumtool.c index 966e110..11b25b1 100644 --- a/sumtool.c +++ b/sumtool.c @@ -88,7 +88,7 @@ static struct option long_options[] = { {NULL, 0, NULL, 0} }; -static char *helptext = +static const char helptext[] = "Usage: sumtool [OPTIONS] -i inputfile -o outputfile\n\n" "Convert the input JFFS2 image to a summarized JFFS2 image\n" "Summary makes mounting faster - if summary support enabled in your kernel\n\n" @@ -112,7 +112,7 @@ static char *helptext = " eraseblock\n\n"; -static char *revtext = "$Revision: 1.9 $"; +static const char revtext[] = "$Revision: 1.9 $"; static unsigned char ffbuf[16] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -927,7 +927,7 @@ int main(int argc, char **argv) close(in_fd); if(out_fd != -1) close(out_fd); - fprintf(stderr,helptext); + fprintf(stderr, "%s", helptext); error_msg_and_die("You must specify input and output files!\n"); } -- cgit v1.2.3