Skip to content

Commit

Permalink
Make sparse clean
Browse files Browse the repository at this point in the history
This fixes the following warnings when compiling with CC=cgcc:

	config.c:197:46: warning: Using plain integer as NULL pointer
	image-ext2.c:208:9: warning: Using plain integer as NULL pointer
	image-ext2.c:212:9: warning: Using plain integer as NULL pointer
	image-ext2.c:213:9: warning: Using plain integer as NULL pointer
	image-hd.c:663:11: warning: symbol 'hdimage_opts' was not declared. Should it be static?
	image-iso.c:52:9: warning: Using plain integer as NULL pointer
	image-rauc.c:191:9: warning: Using plain integer as NULL pointer
	image-vfat.c:130:9: warning: Using plain integer as NULL pointer
  • Loading branch information
ukleinek committed Oct 7, 2020
1 parent fa59222 commit a4b4418
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config.c
Expand Up @@ -194,7 +194,7 @@ int set_config_opts(int argc, char *argv[], cfg_t *cfg)
struct config *c;
cfg_t *cfgsec = NULL;
int num_opts = 0, n, i;
static struct option *long_options = 0;
static struct option *long_options = NULL;
int ret = 0;

if (cfg)
Expand Down
6 changes: 3 additions & 3 deletions image-ext2.c
Expand Up @@ -205,12 +205,12 @@ static cfg_opt_t ext_opts[] = {
CFG_STR("root-owner", "0:0", CFGF_NONE),
CFG_STR("extraargs", "", CFGF_NONE),
CFG_STR("features", NULL, CFGF_NONE),
CFG_STR("label", 0, CFGF_NONE),
CFG_STR("label", NULL, CFGF_NONE),
CFG_STR("fs-timestamp", NULL, CFGF_NONE),
CFG_BOOL("use-mke2fs", cfg_false, CFGF_NONE),
CFG_STR("usage-type", NULL, CFGF_NONE),
CFG_STR("mke2fs-conf", 0, CFGF_NONE),
CFG_STR("mke2fs_conf", 0, CFGF_NONE),
CFG_STR("mke2fs-conf", NULL, CFGF_NONE),
CFG_STR("mke2fs_conf", NULL, CFGF_NONE),
CFG_END()
};

Expand Down
2 changes: 1 addition & 1 deletion image-hd.c
Expand Up @@ -660,7 +660,7 @@ static int hdimage_setup(struct image *image, cfg_t *cfg)
return 0;
}

cfg_opt_t hdimage_opts[] = {
static cfg_opt_t hdimage_opts[] = {
CFG_STR("align", "512", CFGF_NONE),
CFG_STR("disk-signature", "", CFGF_NONE),
CFG_STR("disk-uuid", NULL, CFGF_NONE),
Expand Down
2 changes: 1 addition & 1 deletion image-iso.c
Expand Up @@ -49,7 +49,7 @@ static int iso_generate(struct image *image)
}

static cfg_opt_t iso_opts[] = {
CFG_STR("boot-image", 0, CFGF_NONE),
CFG_STR("boot-image", NULL, CFGF_NONE),
CFG_STR("bootargs", "-no-emul-boot -boot-load-size 4 -boot-info-table -c boot.cat -hide boot.cat", CFGF_NONE),
CFG_STR("extraargs", "", CFGF_NONE),
CFG_STR("input-charset", "default", CFGF_NONE),
Expand Down
2 changes: 1 addition & 1 deletion image-rauc.c
Expand Up @@ -188,7 +188,7 @@ static cfg_opt_t file_opts[] = {

static cfg_opt_t rauc_opts[] = {
CFG_STR("extraargs", "", CFGF_NONE),
CFG_STR_LIST("files", 0, CFGF_NONE),
CFG_STR_LIST("files", NULL, CFGF_NONE),
CFG_SEC("file", file_opts, CFGF_MULTI | CFGF_TITLE),
CFG_STR("key", NULL, CFGF_NONE),
CFG_STR("cert", NULL, CFGF_NONE),
Expand Down
2 changes: 1 addition & 1 deletion image-vfat.c
Expand Up @@ -127,7 +127,7 @@ static cfg_opt_t file_opts[] = {
static cfg_opt_t vfat_opts[] = {
CFG_STR("extraargs", "", CFGF_NONE),
CFG_STR("label", "", CFGF_NONE),
CFG_STR_LIST("files", 0, CFGF_NONE),
CFG_STR_LIST("files", NULL, CFGF_NONE),
CFG_SEC("file", file_opts, CFGF_MULTI | CFGF_TITLE),
CFG_END()
};
Expand Down

0 comments on commit a4b4418

Please sign in to comment.