[systemd-devel] [PATCH] hashmap: Remove unused auxv variable

Lennart Poettering lennart at poettering.net
Tue Dec 10 11:53:49 PST 2013


On Tue, 10.12.13 11:47, Marcel Holtmann (marcel at holtmann.org) wrote:

>   CC       src/shared/hashmap.lo
> src/shared/hashmap.c: In function 'hashmap_new':
> src/shared/hashmap.c:188:15: warning: unused variable 'auxv' [-Wunused-variable]
>          void *auxv;
>                ^
> ---
>  src/shared/hashmap.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c
> index 8f5957b4ac80..d8d6bc719d2a 100644
> --- a/src/shared/hashmap.c
> +++ b/src/shared/hashmap.c
> @@ -185,7 +185,6 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) {
>          bool b;
>          Hashmap *h;
>          size_t size;
> -        void *auxv;
>  
>          b = is_main_thread();

That's a bit extreme, we need that variable on systems that have
getauxval(), i.e. anything more recent. (You really should upgrade your
system...)

Anyway, committed a different patch now that moves the declaration of
that variable into the code that actually uses getauxval().

Thanks,

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list