From 3f1e970b5ad23435b63188ed4f081f6c32d4d7f2 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 6 Jan 2012 10:44:45 -0200 Subject: [PATCH] Revert "tools/kmod-depmod: fix aliasing warning" This reverts commit f63fc9e606449a36d26cc9a99431229e4efacdad. Wrong author name. I'll apply it again later. --- tools/kmod-depmod.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c index 70c397cc..7da9d0e0 100644 --- a/tools/kmod-depmod.c +++ b/tools/kmod-depmod.c @@ -2039,14 +2039,13 @@ static int output_softdeps(struct depmod *depmod, FILE *out) static int output_symbols(struct depmod *depmod, FILE *out) { struct hash_iter iter; - const void *v; + const struct symbol *sym; fputs("# Aliases for symbols, used by symbol_request().\n", out); hash_iter_init(depmod->symbols, &iter); - while (hash_iter_next(&iter, NULL, &v)) { - const struct symbol *sym = v; + while (hash_iter_next(&iter, NULL, (const void **) &sym)) { if (sym->owner == NULL) continue; @@ -2063,7 +2062,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 void *v; + const struct symbol *sym; if (out == stdout) return 0; @@ -2075,9 +2074,8 @@ 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, &v)) { + while (hash_iter_next(&iter, NULL, (const void **) &sym)) { int duplicate; - const struct symbol *sym = v; if (sym->owner == NULL) continue; -- 2.47.3