From: Lucas De Marchi Date: Fri, 2 Dec 2011 12:00:03 +0000 (-0200) Subject: Clean 'shadowed declaration' warnings X-Git-Tag: v1~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fc1c9a06f533788e25571d2b0fc6887b2062381;p=thirdparty%2Fkmod.git Clean 'shadowed declaration' warnings --- diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index 6afa122a..7438b189 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -100,9 +100,9 @@ int kmod_module_parse_dep(struct kmod_module *mod, char *line) for (p = strtok_r(p, " \t", &saveptr); p != NULL; p = strtok_r(NULL, " \t", &saveptr)) { const char *modname = path_to_modname(p, false); - struct kmod_module *mod; + struct kmod_module *depmod; - err = kmod_module_new_from_name(ctx, modname, &mod); + err = kmod_module_new_from_name(ctx, modname, &depmod); if (err < 0) { ERR(ctx, "ctx=%p modname=%s error=%s\n", ctx, modname, strerror(-err)); @@ -111,7 +111,7 @@ int kmod_module_parse_dep(struct kmod_module *mod, char *line) DBG(ctx, "add dep: %s\n", modname); - list = kmod_list_append(list, mod); + list = kmod_list_append(list, depmod); n++; } diff --git a/test/test-lookup.c b/test/test-lookup.c index 42656ece..29a7d3c9 100644 --- a/test/test-lookup.c +++ b/test/test-lookup.c @@ -13,7 +13,6 @@ int main(int argc, char *argv[]) const char *alias; struct kmod_ctx *ctx; struct kmod_list *list = NULL, *l; - struct kmod_module *mod; int err; printf("libkmod version %s\n", VERSION);