Send inn-workers mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."


Today's Topics:

   1. Adding new gcc warnings (Julien ?LIE)


----------------------------------------------------------------------

Message: 1
Date: Sun, 14 Apr 2013 22:41:58 +0200
From: Julien ?LIE <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Adding new gcc warnings
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

As gcc 4.4.x is currently used for the daily generation of snapshots,
maybe we could add new warnings for "make warnings" builds.

I suggest the following flags:
-Wformat-y2k
-Winit-self
-Wold-style-definition
-Wmissing-declarations
-Wnormalized=nfc
-Wpacked
-Winline
-Wsync-nand
-Wvla


Should -Wswitch-default be added?  It implies that all switch statements
are required to have a default case, even though all possible cases
are correctly handled.


Should -Wfloat-equal be added?  Errors like these ones appear, and
I wonder whether a fix is needed.
In innd/status.c, size is a float:
  if (!size) size = 1; /* avoid divide by zero here too */

In innfeed/host.c:
  if (h->params->dynBacklogFilter != oldBacklogFilter)



-Wunreachable-code, -Wstrict-overflow=2, -Wtraditional-conversion and
-Wlogical-op give false positives, so I believe adding them is not wise.



Incidentally, a warning is triggered by -Wpacked in include/inn/dbz.h:

 typedef struct {
     char               hash[DBZ_INTERNAL_HASH_SIZE];
 } PACKED erec;

Can the PACKED attribute be removed?  I do not understand its usefulness for
a struct of only one variable.




-Wold-style-definition returns an issue in innd/icd.c:

 char *
 ICDreadactive(endp)
    char                **endp;
 {


Can it be replaced with the following definition?

 char *
 ICDreadactive(char **endp)
 {


-- 
Julien ?LIE

? Dans un mois, dans un an, comment souffrirons-nous ? ? (Jean
  Racine)


------------------------------

_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers

End of inn-workers Digest, Vol 50, Issue 4
******************************************

Reply via email to