Mailing List Archive

[Spamassassin Wiki] Update of "CodingStyle" by JustinMason
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by JustinMason:
http://wiki.apache.org/spamassassin/CodingStyle

The comment on the change is:
add style-guide entry about bug 4593

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

In our C code we took the easiest way and adopted the [http://www.apache.org/dev/styleguide.html Apache Developers' C Language Style Guide].

+ One addition, arising from [http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4593 bug 4593]: if there are warnings about variables being signed/unsigned, caused by use of "int" types in system calls that accept "size_t" (or similar), it is better to *carefully* perform a cast in the call(s) to the specific system calls being warned about, instead of changing the type of variables on a global scale to be a "size_t". Bug 4593 is a good example of how this can cause bugs as a side-effect due to -1 being used as an error indicator.
+