RPM Community Forums

Mailing List Message of <popt-devel>

Re: Enable more compiler warnings in gcc and fix the complaints

From: Jeff Johnson <n3npq@mac.com>
Date: Sat 08 Mar 2008 - 18:30:34 CET
Message-Id: <55FAFF7E-20A5-4571-920D-674F5C670104@mac.com>

On Mar 8, 2008, at 12:10 PM, Wayne Davison wrote:

> The attached patch turns on more extensive warnings in gcc (-W) and  
> then
> fixes a bunch of unused-arg warnings and one signed/unsigned  
> comparison
> warning.  Non-gcc compilers should be unaffected.
>
> This should help to find problems in the future, and will allow other
> packages (such as rsync) to compile the popt code with -W w/o compiler
> warnings showing up.
>
> ..wayne..<compiler-warnings.diff>

I'm not really sure that adding __attribute__((__unused__)) helps
anything. All of the changes were already marked with splint
/*@unused@*/ which are regularly verified with "make lint".

OTOH the patch hurts nothing but compiler portability complexity.

Added, thanks for the patch.

73 de Jeff
Received on Sat Mar 8 18:30:39 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.