zsh-workers
 help / color / mirror / code / Atom feed
* Enabling more warnings?
@ 2004-05-25 19:22 Wayne Davison
  2004-05-25 19:57 ` Clint Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wayne Davison @ 2004-05-25 19:22 UTC (permalink / raw)
  To: zsh-workers

What do folks think about turning on more gcc warnings and then changing
the code to eliminate them?  Adding -W to the CFLAGS generates a bunch
of "unused parameter" warnings, which we can either turn off with the
-Wno-unused-parameters option, or tweak in the code explicitly, like the
following:

#define UNUSED(x) x __attribute__((__unused__))
int
bin_set(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))

Or maybe this:

#define _U_ __attribute__((__unused__))
int
bin_set(char *nam, char **args, Options ops _U_, int func _U_)

I personally think that the UNUSED(x) one reads better than _U_, but I'm
not sure we want these sprinkled around in the code (rsync uses this
method, but we don't have nearly as many unused parameters as zsh does).

Thoughts?  The -W option turns up other warnings to fix as well, so I'm
also curious how people react to turning on -W by default.

..wayne..


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-28 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-25 19:22 Enabling more warnings? Wayne Davison
2004-05-25 19:57 ` Clint Adams
2004-05-25 20:18 ` Wayne Davison
2004-05-28 19:30   ` Wayne Davison
2004-05-26 13:48 ` Clint Adams
2004-05-26 14:04   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).