From a593f1304e2143befbbfb315b5e560a67f74edfc Mon Sep 17 00:00:00 2001 From: aland Date: Mon, 28 May 2007 12:52:51 +0000 Subject: [PATCH] Cleaned up to avoid compiler warnings --- src/main/modcall.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/modcall.c b/src/main/modcall.c index 0a847b2..275705d 100644 --- a/src/main/modcall.c +++ b/src/main/modcall.c @@ -1031,6 +1031,8 @@ static modcallable *do_compile_modupdate(modcallable *parent, "config", NULL }; + component = component; /* -Wunused */ + for (i = 0; attrlist_names[i] != NULL; i++) { if (strcmp(name2, attrlist_names[i]) == 0) { ok = TRUE; @@ -1039,7 +1041,8 @@ static modcallable *do_compile_modupdate(modcallable *parent, } if (!ok) { - radlog(L_ERR, "%s[%d]: Unknown attribute list \"%s\"", name2); + radlog(L_ERR, "%s[%d]: Unknown attribute list \"%s\"", + filename, lineno, name2); return NULL; } @@ -1067,7 +1070,7 @@ static modcallable *do_compile_modupdate(modcallable *parent, if (!dict_attrbyname(attr)) { radlog(L_ERR|L_CONS, "%s[%d]: Unknown attribute \"%s\"", - filename, cf_pair_lineno(cp)); + filename, cf_pair_lineno(cp), attr); return NULL; } @@ -1113,7 +1116,7 @@ static modcallable *do_compile_modsingle(modcallable *parent, CONF_SECTION *cs, *subcs; if (cf_item_is_section(ci)) { - CONF_SECTION *cs = cf_itemtosection(ci); + cs = cf_itemtosection(ci); const char *name2 = cf_section_name2(cs); lineno = cf_section_lineno(cs); @@ -1253,8 +1256,6 @@ static modcallable *do_compile_modsingle(modcallable *parent, return csingle; } else if (strcmp(modrefname, "update") == 0) { - modgroup *g; - if (!cf_section_name2(cs)) { radlog(L_ERR|L_CONS, "%s[%d] Require list name for 'update'.\n", -- 2.1.4