Skip to content

Commit

Permalink
Increase compiler warning level for android
Browse files Browse the repository at this point in the history
And fix the problems uncovered. Remove a bunch of unused parameters
and variables.

Reviewed-by: Luciano Coelho <[email protected]>
  • Loading branch information
Pontus Fuchs committed Oct 11, 2011
1 parent c87bed2 commit df75c33
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 1 addition & 5 deletions misc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion nvs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit df75c33

Please sign in to comment.