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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdbPU=O68q=VY1Qbibmk01MC9j9uiEXOmd65kG5pg_L3AQ@mail.gmail.com>
Date:   Thu, 1 Mar 2018 15:27:41 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Anders Roxell <anders.roxell@...aro.org>
Cc:     "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tools/gpio/gpio-event-mon: fix warning

On Wed, Feb 21, 2018 at 10:33 PM, Anders Roxell
<anders.roxell@...aro.org> wrote:

> PRIu64 is defined in user space to match libc's uint64_t definition.
> However, gpioevent_data structure in the kernel is defined using the
> kernel's own __u64 type.
>
> gpio-event-mon.c: In function ‘monitor_device’:
> gpio-event-mon.c:102:19: warning: format ‘%lu’ expects argument of type
>     ‘long unsigned int’, but argument 3 has type ‘__u64 {aka long long
>     unsigned int}’ [-Wformat=]
>    fprintf(stdout, "GPIO EVENT %" PRIu64 ": ", event.timestamp);
>                    ^~~~~~~~~~~~~~
>   LD       /tmp/kselftest/gpiogpio-event-mon-in.o
>   LINK     /tmp/kselftest/gpiogpio-event-mon
>
> Fix is to replace PRIu64 with llu, which we know is what the kernel uses
> for __u64.
>
> Signed-off-by: Anders Roxell <anders.roxell@...aro.org>

Patch applied with Daniel's test tag.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ