From 42d8264dd0ef02b7764c0cce18231eafc1062257 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 29 Jul 2011 20:45:11 +0200 Subject: [PATCH] misc: fix compilation with new gcc (unused variables warnings) Signed-off-by: Olivier Matz --- src/extension_example/parse_obj_list.c | 3 --- src/genconf/commands.c | 6 +++--- src/genconf/confnode_intconfig.c | 6 ++++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/extension_example/parse_obj_list.c b/src/extension_example/parse_obj_list.c index 34772b9..9c1e820 100644 --- a/src/extension_example/parse_obj_list.c +++ b/src/extension_example/parse_obj_list.c @@ -47,13 +47,10 @@ parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *buf, void *res, struct token_obj_list *tk2 = (struct token_obj_list *)tk; struct token_obj_list_data *tkd = &tk2->obj_list_data; struct object *o; - unsigned int token_len = 0; if (res && ressize < sizeof(struct object *)) return -1; - token_len = strlen(buf); - SLIST_FOREACH(o, tkd->list, next) { if (strcmp(buf, o->name)) continue; diff --git a/src/genconf/commands.c b/src/genconf/commands.c index 1db4595..b18c1c7 100644 --- a/src/genconf/commands.c +++ b/src/genconf/commands.c @@ -504,10 +504,10 @@ static void cmd_show_node_parsed(void *parsed_result, { struct cmd_show_node_result *res = parsed_result; struct confnode *n = res->node; - int details = 0; + /* int details = 0; */ - if (data) - details = 1; + /* if (data) */ + /* details = 1; */ while (n) { confnode_display_long(n); diff --git a/src/genconf/confnode_intconfig.c b/src/genconf/confnode_intconfig.c index 7d759cc..d5f732e 100644 --- a/src/genconf/confnode_intconfig.c +++ b/src/genconf/confnode_intconfig.c @@ -112,7 +112,8 @@ static int confnode_intconfig_set_user_strvalue(struct confnode *n, const char *strvalue) { char *end = NULL; - int val; + int val __attribute__((unused)); + /* XXX support hex and bin */ val = strtoul(strvalue, &end, 0); if ((strvalue[0] == '\0') || (end == NULL) || (*end != '\0')) @@ -140,7 +141,8 @@ static int confnode_intconfig_set_default_strvalue(struct confnode *n, const char *strvalue) { char *end = NULL; - int val; + int val __attribute__((unused)); + /* XXX support hex and bin */ val = strtoul(strvalue, &end, 0); if ((strvalue[0] == '\0') || (end == NULL) || (*end != '\0')) -- 2.20.1