From 55021bed203fa58bf8e4ee85eddfe7416941e41d Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 6 Jan 2012 13:33:11 +0100 Subject: [PATCH] tools/kmod-depmod: fix aliasing warning --- tools/kmod-depmod.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c index 7da9d0e..70c397c 100644 --- a/tools/kmod-depmod.c +++ b/tools/kmod-depmod.c @@ -2039,13 +2039,14 @@ static int output_softdeps(struct depmod *depmod, FILE *out) static int output_symbols(struct depmod *depmod, FILE *out) { struct hash_iter iter; - const struct symbol *sym; + const void *v; fputs("# Aliases for symbols, used by symbol_request().\n", out); hash_iter_init(depmod->symbols, &iter); - while (hash_iter_next(&iter, NULL, (const void **) &sym)) { + while (hash_iter_next(&iter, NULL, &v)) { + const struct symbol *sym = v; if (sym->owner == NULL) continue; @@ -2062,7 +2063,7 @@ static int output_symbols_bin(struct depmod *depmod, FILE *out) char alias[1024]; size_t baselen = sizeof("symbol:") - 1; struct hash_iter iter; - const struct symbol *sym; + const void *v; if (out == stdout) return 0; @@ -2074,8 +2075,9 @@ static int output_symbols_bin(struct depmod *depmod, FILE *out) memcpy(alias, "symbol:", baselen); hash_iter_init(depmod->symbols, &iter); - while (hash_iter_next(&iter, NULL, (const void **) &sym)) { + while (hash_iter_next(&iter, NULL, &v)) { int duplicate; + const struct symbol *sym = v; if (sym->owner == NULL) continue; -- 2.7.4