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

Re: cups-filters 1.16.2 released!



On Mon, Aug 21, 2017 at 08:59:37AM -0300, Till Kamppeter wrote:
> 
> It happened during my warning clean-up. I wanted to get rid of all the
> warning and one warning complained about an unnamed union in the
> libfontembed, I did not succeed to solve this without naming the union,
>...


Anonymous unions are part of C11.

gcc >= 5 defaults to C11, but your -std=gnu99 forces it to C99.


And cups-filters contains a weird combination of compiler flags:

        # Be tough with warnings and produce less careless code
        CFLAGS="$CFLAGS -Wall -pedantic -std=gnu99"
...
CFLAGS="$CFLAGS -D_GNU_SOURCE"

The things -pedantic warns about are not indications of bad code, 
just of less portable code.

-std=gnu99 means "C99 with all GNU extensions"
-D_GNU_SOURCE means "enable all extensions in the GNU C library"
-pedantic means "pedantic warnings for everything that is not in C99"

Do you want to enforce strict standards complicance for maximum 
portability, or do you want to use everything available?

Based on how cups-filters is enabling extensions,
I'd suggest to solve this by removing the -pedantic.


>    Till

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


Reply to: