mbox series

[00/13] Compile with -Wextra

Message ID 20210127085752.120571-1-aik@ozlabs.ru
Headers show
Series Compile with -Wextra | expand

Message

Alexey Kardashevskiy Jan. 27, 2021, 8:57 a.m. UTC
Following the conversation at
https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
this enables -Wextra with the exception of -Wno-unused-parameter.

This is a series to make possible bisecting easier.


This is based on sha1
6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start address".

Please comment. Thanks.



Alexey Kardashevskiy (13):
  helpers: Define MIN()
  libc: Compile with -Wextra
  elf: Compile with -Wextra
  usb: Compile with -Wextra
  veth: Compile with -Wextra
  virtio: Compile with -Wextra
  e1000: Compile with -Wextra
  libnet: Compile with -Wextra
  libhv: Compile with -Wextra
  libnvram: Compile with -Wextra
  libtpm: Compile with -Wextra
  slof/prim: Compile with -Wextra
  Makefile: Actually compile with -Wextra

 include/helpers.h          |  1 +
 include/libelf.h           |  6 +++---
 include/ppcp7/cache.h      |  2 +-
 lib/libnet/netapps.h       |  4 ++--
 lib/libnvram/nvram.h       | 10 +++++-----
 lib/libveth/veth.h         |  2 +-
 lib/libc/stdio/vsnprintf.c | 15 ++++++++-------
 lib/libc/string/memmove.c  |  2 +-
 lib/libe1k/e1k.c           | 16 ++++++++--------
 lib/libelf/elf.c           |  2 +-
 lib/libelf/elf32.c         |  4 ++--
 lib/libelf/elf64.c         |  6 +++---
 lib/libhvcall/rfill.c      |  2 +-
 lib/libnet/netload.c       |  4 ++--
 lib/libnet/ping.c          |  6 +++---
 lib/libnet/pxelinux.c      |  5 +++--
 lib/libnvram/envvar.c      | 13 ++++++-------
 lib/libnvram/nvram.c       | 13 ++++++-------
 lib/libtpm/tcgbios.c       | 10 ++++------
 lib/libtpm/tpm_drivers.c   |  7 +++----
 lib/libusb/usb-core.c      |  4 ++--
 lib/libusb/usb-hid.c       |  2 +-
 lib/libusb/usb-ohci.c      | 12 +++++-------
 lib/libusb/usb-xhci.c      |  4 ++--
 lib/libveth/veth.c         |  8 ++++++--
 lib/libvirtio/p9.c         |  8 ++++----
 lib/libvirtio/virtio.c     |  2 +-
 slof/ppc64.c               | 12 +++++++++---
 make.rules                 |  2 +-
 slof/prim.code             |  3 +++
 30 files changed, 98 insertions(+), 89 deletions(-)

Comments

Segher Boessenkool Jan. 27, 2021, 11:02 p.m. UTC | #1
On Wed, Jan 27, 2021 at 07:57:39PM +1100, Alexey Kardashevskiy wrote:
> Following the conversation at
> https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
> this enables -Wextra with the exception of -Wno-unused-parameter.
> 
> This is a series to make possible bisecting easier.
> 
> 
> This is based on sha1
> 6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start address".
> 
> Please comment. Thanks.

I commented on 2/13.  I also don't like the casts in 11/13, but the code
does seem to do the right thing.

1/13 is actually a bugfix, no?

Thank you for doing this,


Segher
Alexey Kardashevskiy Jan. 28, 2021, 2:23 a.m. UTC | #2
On 28/01/2021 10:02, Segher Boessenkool wrote:
> On Wed, Jan 27, 2021 at 07:57:39PM +1100, Alexey Kardashevskiy wrote:
>> Following the conversation at
>> https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
>> this enables -Wextra with the exception of -Wno-unused-parameter.
>>
>> This is a series to make possible bisecting easier.
>>
>>
>> This is based on sha1
>> 6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start address".
>>
>> Please comment. Thanks.
> 
> I commented on 2/13.  I also don't like the casts in 11/13, but the code
> does seem to do the right thing.
> 
> 1/13 is actually a bugfix, no?


I did not even realize that, good eye! :)


> Thank you for doing this,

I kinda have to, as a slof emperor :)
Segher Boessenkool Jan. 28, 2021, 3:52 a.m. UTC | #3
On Thu, Jan 28, 2021 at 01:23:24PM +1100, Alexey Kardashevskiy wrote:
> On 28/01/2021 10:02, Segher Boessenkool wrote:
> >On Wed, Jan 27, 2021 at 07:57:39PM +1100, Alexey Kardashevskiy wrote:
> >>Following the conversation at
> >>https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
> >>this enables -Wextra with the exception of -Wno-unused-parameter.
> >>
> >>This is a series to make possible bisecting easier.
> >>
> >>
> >>This is based on sha1
> >>6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start 
> >>address".
> >>
> >>Please comment. Thanks.
> >
> >I commented on 2/13.  I also don't like the casts in 11/13, but the code
> >does seem to do the right thing.
> >
> >1/13 is actually a bugfix, no?
> 
> 
> I did not even realize that, good eye! :)

I typoed that, wow...  12/13!  (It decreases "size" in every fallthrough
case, which might or might now work, bu is surely not intended).

> >Thank you for doing this,
> 
> I kinda have to, as a slof emperor :)

There are emperors now?  I'm jealous!


Segher
Alexey Kardashevskiy Jan. 28, 2021, 4:32 a.m. UTC | #4
On 28/01/2021 14:52, Segher Boessenkool wrote:
> On Thu, Jan 28, 2021 at 01:23:24PM +1100, Alexey Kardashevskiy wrote:
>> On 28/01/2021 10:02, Segher Boessenkool wrote:
>>> On Wed, Jan 27, 2021 at 07:57:39PM +1100, Alexey Kardashevskiy wrote:
>>>> Following the conversation at
>>>> https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
>>>> this enables -Wextra with the exception of -Wno-unused-parameter.
>>>>
>>>> This is a series to make possible bisecting easier.
>>>>
>>>>
>>>> This is based on sha1
>>>> 6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start
>>>> address".
>>>>
>>>> Please comment. Thanks.
>>>
>>> I commented on 2/13.  I also don't like the casts in 11/13, but the code
>>> does seem to do the right thing.
>>>
>>> 1/13 is actually a bugfix, no?
>>
>>
>> I did not even realize that, good eye! :)
> 
> I typoed that, wow...  12/13!  (It decreases "size" in every fallthrough
> case, which might or might now work, bu is surely not intended).

First I thought it is for when the size is unaligned but it is not :)


> 
>>> Thank you for doing this,
>>
>> I kinda have to, as a slof emperor :)
> 
> There are emperors now?  I'm jealous!

Want to own SLOF again? ;)
Alexey Kardashevskiy Jan. 28, 2021, 4:49 a.m. UTC | #5
On 28/01/2021 10:02, Segher Boessenkool wrote:
> On Wed, Jan 27, 2021 at 07:57:39PM +1100, Alexey Kardashevskiy wrote:
>> Following the conversation at
>> https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
>> this enables -Wextra with the exception of -Wno-unused-parameter.
>>
>> This is a series to make possible bisecting easier.
>>
>>
>> This is based on sha1
>> 6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start address".
>>
>> Please comment. Thanks.
> 
> I commented on 2/13.  I also don't like the casts in 11/13, but the code
> does seem to do the right thing.


What would be nicer to do in 11/13 then?


> 
> 1/13 is actually a bugfix, no?
> 
> Thank you for doing this,
Segher Boessenkool Jan. 28, 2021, 5:08 a.m. UTC | #6
On Thu, Jan 28, 2021 at 03:32:35PM +1100, Alexey Kardashevskiy wrote:
> >>I kinda have to, as a slof emperor :)
> >
> >There are emperors now?  I'm jealous!
> 
> Want to own SLOF again? ;)

Well...  There are gradations of jealous...  /me shrinks away.


Segher
Segher Boessenkool Jan. 28, 2021, 5:11 a.m. UTC | #7
On Thu, Jan 28, 2021 at 03:49:58PM +1100, Alexey Kardashevskiy wrote:
> 
> 
> On 28/01/2021 10:02, Segher Boessenkool wrote:
> >On Wed, Jan 27, 2021 at 07:57:39PM +1100, Alexey Kardashevskiy wrote:
> >>Following the conversation at
> >>https://patchwork.ozlabs.org/project/slof/patch/20210122172133.2074177-1-f4bug@amsat.org/
> >>this enables -Wextra with the exception of -Wno-unused-parameter.
> >>
> >>This is a series to make possible bisecting easier.
> >>
> >>
> >>This is based on sha1
> >>6184ca06c8d8 Gustavo Romero "board-qemu: Fix comment about SLOF start 
> >>address".
> >>
> >>Please comment. Thanks.
> >
> >I commented on 2/13.  I also don't like the casts in 11/13, but the code
> >does seem to do the right thing.
> 
> What would be nicer to do in 11/13 then?

Something without those casts :-)  It's probably not worth the effort
changing this.


Segher