freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Warnings with -Wcast-qual, -Wcast-align and -Wunused-para


From: Hedges Alexander
Subject: Re: [ft-devel] Warnings with -Wcast-qual, -Wcast-align and -Wunused-parameter enabled
Date: Sun, 26 Mar 2017 17:20:38 +0000

> On 26 Mar 2017, at 18:05, Werner LEMBERG <address@hidden> wrote:
> 
> 
>> With the warnings -Wcast-qual, -Wcast-align enabled the compiler
>> (clang as well as GCC) prints out a slew of warnings especially of
>> the former type.
> 
> Currently, both `-Wcast-qual' and `-Wcast-align' are not taken into
> account.  We try hard to make `-Wall' run without warnings, however,
> the two additional warning flags are not part of it.

Got it, so I’ll just disable these warnings.

> 
>> Also I get a few -Wunused-parameter warnings.
> 
> Really?  I don't get this.  Please elaborate.

the first two I get are in pcfdrivr.c
for both parameters `const char* property_name` clang emits: 
error: unused parameter ‘property_name’.
I checked the parameters and they only seem used if 
PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is defined, depending on how FT_TRACE0 is 
defined.

> 
>> On gcc I remember additionally getting some warnings about shadowing
>> global symbols, but I might be mistaken.
> 
> Ditto.
In the mailing list there is a mail titled “Mysterious warning message” which 
seems to be referencing the same issue.
> 
>> Right now I’m tempted to turn off the default -Werror for the build
>> process or disable said warnings, but it is probably better not to
>> if I can avoid it.
> 
> Patches are welcomed that don't uglify the source code.
> 
If I change anything locally I'll definitely send you a patch.
> 
>    Werner


reply via email to

[Prev in Thread] Current Thread [Next in Thread]