From: Johannes Berg Date: Fri, 23 Nov 2007 11:21:59 +0000 (+0100) Subject: b43-fwcutter: make sparse happier X-Git-Tag: b43-fwcutter-013~77 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fb46bb3abf390221c3108af46a7179c1c726204f;p=b43-tools.git b43-fwcutter: make sparse happier Just for the fun of it. Signed-off-by: Johannes Berg Signed-off-by: Michael Buesch --- diff --git a/fwcutter/fwcutter.c b/fwcutter/fwcutter.c index ae1c63a..fb51beb 100644 --- a/fwcutter/fwcutter.c +++ b/fwcutter/fwcutter.c @@ -553,7 +553,7 @@ static int do_cmp_arg(char **argv, int *pos, if (param) { /* Skip the parameter on the next iteration. */ (*pos)++; - if (*param == 0) { + if (!*param) { printf("%s needs a parameter\n", arg); return ARG_ERROR; } @@ -591,34 +591,34 @@ static int parse_args(int argc, char *argv[]) if (argc < 2) goto out_usage; for (i = 1; i < argc; i++) { - res = cmp_arg(argv, &i, "--list", "-l", 0); + res = cmp_arg(argv, &i, "--list", "-l", NULL); if (res == ARG_MATCH) { cmdargs.mode = FWCM_LIST; continue; } else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--version", "-v", 0); + res = cmp_arg(argv, &i, "--version", "-v", NULL); if (res == ARG_MATCH) { print_banner(); return 1; } else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--help", "-h", 0); + res = cmp_arg(argv, &i, "--help", "-h", NULL); if (res == ARG_MATCH) goto out_usage; else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--identify", "-i", 0); + res = cmp_arg(argv, &i, "--identify", "-i", NULL); if (res == ARG_MATCH) { cmdargs.mode = FWCM_IDENTIFY; continue; } else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--unsupported", NULL, 0); + res = cmp_arg(argv, &i, "--unsupported", NULL, NULL); if (res == ARG_MATCH) { cmdargs.unsupported = 1; continue; diff --git a/fwcutter/fwcutter_list.h b/fwcutter/fwcutter_list.h index bed370a..0429cf6 100644 --- a/fwcutter/fwcutter_list.h +++ b/fwcutter/fwcutter_list.h @@ -1,6 +1,6 @@ /* file member lists */ -struct extract _e08665c5c5b66beb9c3b2dd54aa80cb3[] = +static struct extract _e08665c5c5b66beb9c3b2dd54aa80cb3[] = { { .name = "ucode2", .offset = 0x59ca0, .length = 0x3fe0, .type = EXT_UCODE_1, }, { .name = "ucode4", .offset = 0x5dc84, .length = 0x4e78, .type = EXT_UCODE_1, }, @@ -21,7 +21,7 @@ struct extract _e08665c5c5b66beb9c3b2dd54aa80cb3[] = EXTRACT_LIST_END }; -struct extract _9207bc565c2fc9fa1591f6c7911d3fc0[] = +static struct extract _9207bc565c2fc9fa1591f6c7911d3fc0[] = { { .name = "ucode4", .offset = 0x66220 + 0x7ad8, .length = 0x4e68, .type = EXT_UCODE_1, }, { .name = "ucode5", .offset = 0x66220 + 0xc944, .length = 0x5640, .type = EXT_UCODE_2, }, @@ -48,7 +48,7 @@ struct extract _9207bc565c2fc9fa1591f6c7911d3fc0[] = EXTRACT_LIST_END }; -struct extract _722e2e0d8cc04b8f118bb5afe6829ff9[] = +static struct extract _722e2e0d8cc04b8f118bb5afe6829ff9[] = { { .name = "ucode4", .offset = 0x76a10 + 0x8960, .length = 0x4e68, .type = EXT_UCODE_1, }, { .name = "ucode5", .offset = 0x76a10 + 0xd7cc, .length = 0x5640, .type = EXT_UCODE_2, }, @@ -75,7 +75,7 @@ struct extract _722e2e0d8cc04b8f118bb5afe6829ff9[] = EXTRACT_LIST_END }; -struct extract _1e4763b4cb8cfbaae43e5c6d3d6b2ae7[] = +static struct extract _1e4763b4cb8cfbaae43e5c6d3d6b2ae7[] = { { .name = "ucode5", .offset = 0x71c80 + 0xacd0, .length = 0x5768, .type = EXT_UCODE_2, }, { .name = "ucode9", .offset = 0x71c80 + 0x1043c, .length = 0x6240, .type = EXT_UCODE_2, },