From df75c33e0a6bddf3ee15e543acab29908d33816d Mon Sep 17 00:00:00 2001 From: Pontus Fuchs Date: Tue, 4 Oct 2011 10:19:43 +0200 Subject: [PATCH] Increase compiler warning level for android And fix the problems uncovered. Remove a bunch of unused parameters and variables. Reviewed-by: Luciano Coelho --- Android.mk | 2 +- ini.c | 4 ++-- misc_cmds.c | 6 +----- nvs.c | 2 +- nvs.h | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Android.mk b/Android.mk index 52eca44..ee700ad 100644 --- a/Android.mk +++ b/Android.mk @@ -12,7 +12,7 @@ LOCAL_SRC_FILES := \ plt.c \ ini.c -LOCAL_CFLAGS := +LOCAL_CFLAGS := -Wall -Wno-unused-parameter LOCAL_C_INCLUDES := \ $(LOCAL_PATH) \ external/libnl/include diff --git a/ini.c b/ini.c index 8f71a11..610bc12 100644 --- a/ini.c +++ b/ini.c @@ -934,7 +934,7 @@ static int find_section(const char *l, enum wl1271_ini_section *st, int *cntr, return 1; } -static int ini_parse_line(char *l, int nbr, struct wl12xx_common *cmn) +static int ini_parse_line(char *l, struct wl12xx_common *cmn) { static enum wl1271_ini_section status; static int cntr; @@ -1186,7 +1186,7 @@ int read_ini(const char *filename, struct wl12xx_common *cmn) /* start parsing */ while (ini_get_line(buf, sizeof(buf), f, &line, &pos)) { - ret = ini_parse_line(pos, line, cmn); + ret = ini_parse_line(pos, cmn); if (ret) break; } diff --git a/misc_cmds.c b/misc_cmds.c index dc3fa48..d5647b7 100644 --- a/misc_cmds.c +++ b/misc_cmds.c @@ -296,10 +296,6 @@ static int get_dump_nvs(struct nl80211_state *state, struct nl_cb *cb, struct nl_msg *msg, int argc, char **argv) { char *fname = NULL; - struct wl12xx_common cmn = { - .arch = UNKNOWN_ARCH, - .parse_ops = NULL - }; argc -= 2; argv += 2; @@ -308,7 +304,7 @@ static int get_dump_nvs(struct nl80211_state *state, struct nl_cb *cb, if (!fname) return 1; - if (dump_nvs_file(fname, &cmn)) { + if (dump_nvs_file(fname)) { fprintf(stderr, "Fail to dump NVS file\n"); return 1; } diff --git a/nvs.c b/nvs.c index 6f1cb5c..45b24b2 100644 --- a/nvs.c +++ b/nvs.c @@ -761,7 +761,7 @@ int update_nvs_file(const char *nvs_infile, const char *nvs_outfile, struct wl12 return res; } -int dump_nvs_file(const char *nvs_file, struct wl12xx_common *cmn) +int dump_nvs_file(const char *nvs_file) { int sz=0, size; char buf[2048]; diff --git a/nvs.h b/nvs.h index b8a1ce6..481fbe2 100644 --- a/nvs.h +++ b/nvs.h @@ -18,7 +18,7 @@ int create_nvs_file(struct wl12xx_common *cmn); int update_nvs_file(const char *nvs_infile, const char *nvs_outfile, struct wl12xx_common *cmn); -int dump_nvs_file(const char *nvs_file, struct wl12xx_common *cmn); +int dump_nvs_file(const char *nvs_file); int set_nvs_file_autofem(const char *nvs_file, unsigned char val, struct wl12xx_common *cmn);