Search Linux Wireless

Re: [PATCH] iw: fix formats under MIPS64/PPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 1, 2024 at 3:10 PM Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
>
> On Mon, 2024-07-01 at 15:07 -0700, Rosen Penev wrote:
> >
> > They go away because if the define is found before any header
> > inclusion, __u64 gets defined to unsigned long long.
>
> It *isn't* found before any header inclusion though.
>
> For pretty much all of the C files, "iw.h" comes _last_ in the list of
> included headers.
Oh I see what you mean. No real idea. However without this patch, I get

event.c: In function 'parse_nan_match':
event.c:668:41: error: format '%llx' expects argument of type 'long
long unsigned int', but argument 2 has type '__u64' {aka 'long
unsigned int'} [-Werror=format=]
  668 |                        "NAN(cookie=0x%llx): DiscoveryResult,
peer_id=%d, local_id=%d, peer_mac=%s",
      |                                      ~~~^
      |                                         |
      |                                         long long unsigned int
      |                                      %lx
  669 |                        cookie,
      |                        ~~~~~~
      |                        |
      |                        __u64 {aka long unsigned int}
event.c:680:41: error: format '%llx' expects argument of type 'long
long unsigned int', but argument 2 has type '__u64' {aka 'long
unsigned int'} [-Werror=format=]
  680 |                        "NAN(cookie=0x%llx): Replied,
peer_id=%d, local_id=%d, peer_mac=%s",
      |                                      ~~~^
      |                                         |
      |                                         long long unsigned int
      |                                      %lx
  681 |                        cookie,
      |                        ~~~~~~
      |                        |
      |                        __u64 {aka long unsigned int}
event.c:688:41: error: format '%llx' expects argument of type 'long
long unsigned int', but argument 2 has type '__u64' {aka 'long
unsigned int'} [-Werror=format=]
  688 |                        "NAN(cookie=0x%llx): FollowUpReceive,
peer_id=%d, local_id=%d, peer_mac=%s",
      |                                      ~~~^
      |                                         |
      |                                         long long unsigned int
      |                                      %lx
  689 |                        cookie,
      |                        ~~~~~~
      |                        |
      |                        __u64 {aka long unsigned int}


And many others.

I submitted a similar patch to fio and was advised to move the define
into the Makefiles. Not too sure how to do that here.
>
> johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux