lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+7wUswQGhQS6FTdRkGhhJKFbfoVpmzwWdT_9GoOicEF0OXFPQ@mail.gmail.com>
Date:   Fri, 22 Jun 2018 11:48:02 +0200
From:   Mathieu Malaterre <malat@...ian.org>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     Christophe LEROY <christophe.leroy@....fr>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 03/19] powerpc: Move `path` variable inside DEBUG_PROM

This one should be ok.

On Wed, Apr 4, 2018 at 10:08 PM Mathieu Malaterre <malat@...ian.org> wrote:
>
> Add gcc attribute unused for two variables. Fix warnings treated as errors
> with W=1:
>
>   arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable]
>
> Suggested-by: Christophe Leroy <christophe.leroy@....fr>
> Signed-off-by: Mathieu Malaterre <malat@...ian.org>
> ---
> v3: really move path within ifdef DEBUG_PROM
> v2: move path within ifdef DEBUG_PROM
>
>  arch/powerpc/kernel/prom_init.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index acf4b2e0530c..223b35acbbdd 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -603,7 +603,7 @@ static void __init early_cmdline_parse(void)
>         const char *opt;
>
>         char *p;
> -       int l = 0;
> +       int l __maybe_unused = 0;
>
>         prom_cmd_line[0] = 0;
>         p = prom_cmd_line;
> @@ -1385,7 +1385,10 @@ static void __init reserve_mem(u64 base, u64 size)
>  static void __init prom_init_mem(void)
>  {
>         phandle node;
> -       char *path, type[64];
> +#ifdef DEBUG_PROM
> +       char *path;
> +#endif
> +       char type[64];
>         unsigned int plen;
>         cell_t *p, *endp;
>         __be32 val;
> @@ -1406,7 +1409,9 @@ static void __init prom_init_mem(void)
>         prom_debug("root_size_cells: %x\n", rsc);
>
>         prom_debug("scanning memory:\n");
> +#ifdef DEBUG_PROM
>         path = prom_scratch;
> +#endif
>
>         for (node = 0; prom_next_node(&node); ) {
>                 type[0] = 0;
> --
> 2.11.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ