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 --- mkfs.jffs2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mkfs.jffs2.c') diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c index 4ba71fe..181fe9d 100644 --- a/mkfs.jffs2.c +++ b/mkfs.jffs2.c @@ -1090,7 +1090,7 @@ static uint32_t highest_xseqno = 0; static struct { int xprefix; - char *string; + const char *string; int length; } xprefix_tbl[] = { { JFFS2_XPREFIX_USER, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN }, @@ -1232,7 +1232,8 @@ static void write_xattr_entry(struct filesystem_entry *e) struct jffs2_raw_xref ref; struct xattr_entry *xe; char xlist[XATTR_BUFFER_SIZE], xvalue[XATTR_BUFFER_SIZE]; - char *xname, *prefix_str; + char *xname; + const char *prefix_str; int i, xprefix, prefix_len; int list_sz, offset, name_len, value_len; @@ -1481,7 +1482,7 @@ static struct option long_options[] = { {NULL, 0, NULL, 0} }; -static char *helptext = +static const char helptext[] = "Usage: mkfs.jffs2 [OPTIONS]\n" "Make a JFFS2 file system image from an existing directory tree\n\n" "Options:\n" @@ -1520,7 +1521,7 @@ static char *helptext = " -V, --version Display version information\n" " -i, --incremental=FILE Parse FILE and generate appendage output for it\n\n"; -static char *revtext = "1.60"; +static const char revtext[] = "1.60"; int load_next_block() { -- cgit v1.2.3