[PATCH] Fix pedanic warnings without a storage increase

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Aug 30 18:59:07 UTC 2022


On 30/08/2022 19:45, Joel Sherrill wrote:
> 
> 
> On Tue, Aug 30, 2022 at 9:40 AM Sebastian Huber 
> <sebastian.huber at embedded-brains.de 
> <mailto:sebastian.huber at embedded-brains.de>> wrote:
> 
>     On 30/08/2022 16:38, Joel Sherrill wrote:
>      >     +  /*
>      >     +   * Ignore these warnings:
>      >     +   *
>      >     +   * - invalid use of structure with flexible array member
>      >     +   *
>      >     +   * - struct has no members
>      >     +   */
>      >     +  #pragma GCC diagnostic push
>      >     +  #pragma GCC diagnostic ignored "-Wpedantic"
>      >
>      >
>      > This is heavy handed. -Warray-bounds should be enough.
> 
>     There is no array bounds warning. There are only the above two
>     -Wpedantic warnings.
> 
> 
> OK I was suggesting that because -Wzero-length-bounds which should be
> the precise warning was turned on by -Warray-bounds.
> 
> How about just -Wzero-length-bounds?

The patch changes Ready to a flexible array member, so the 
-Wzero-length-bounds should not be applicable.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list