[Flac-dev] Two GCC warnings flags you should enable ASAP
Josh Coalson
xflac at yahoo.com
Wed Sep 12 17:49:16 PDT 2007
I'll add these, I think they didn't get in with your previous patch
because I withheld a part of it for some other reason...
--- Erik de Castro Lopo <erikd-flac at mega-nerd.com> wrote:
> Josh,
>
> There are two GCC warning flags you should enable for all the
> C code ASAP. From the gcc man page:
>
> -Wmissing-prototypes (C only)
> Warn if a global function is defined without a previous prototype
> declaration. This warning is issued even if the definition
> itself
> provides a prototype. The aim is to detect global functions that
>
> fail to be declared in header files.
>
> -Wstrict-prototypes (C only)
> Warn if a function is declared or defined without specifying the
> argument types. (An old-style function definition is permitted
> without a warning if preceded by a declaration which specifies
> the
> argument types.)
>
> Currently in the file src/share/utf8/charset.c you use the new
> allocation
> functions without including "include/share/alloc.h". The first
> warning
> flag above would catch this issue. The second warning flag will catch
> things like old-style K&R function definitions which were obsoleted
> by the 18 year old 1989 C standard :-).
>
> These two warning flags have been available at least since gcc-2.95.
> All the 3 and 4 series gcc compilers accept them.
>
> Cheers,
> Erik
> --
> -----------------------------------------------------------------
> Erik de Castro Lopo
> -----------------------------------------------------------------
> "When exported to Muslim lands, various aspects of Western pop
> culture must be modified in order to accommodate Muslim
> sensibilities.
> When Muslims come West, various aspects of Western pop culture must
> be modified in order to accommodate Muslim sensibilities."
> -- http://www.jihadwatch.org/dhimmiwatch/archives/008623.php
> _______________________________________________
> Flac-dev mailing list
> Flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
>
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
More information about the Flac-dev
mailing list