From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23764 invoked from network); 25 May 2004 19:23:18 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 25 May 2004 19:23:18 -0000 Received: (qmail 27353 invoked from network); 25 May 2004 19:23:03 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 May 2004 19:23:03 -0000 Received: (qmail 17313 invoked by alias); 25 May 2004 19:23:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19978 Received: (qmail 17301 invoked from network); 25 May 2004 19:23:00 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 25 May 2004 19:22:57 -0000 Received: (qmail 27199 invoked from network); 25 May 2004 19:22:57 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO binome.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 25 May 2004 19:22:55 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id 8365E12C1F; Tue, 25 May 2004 12:22:54 -0700 (PDT) Date: Tue, 25 May 2004 12:22:54 -0700 From: Wayne Davison To: zsh-workers@sunsite.dk Subject: Enabling more warnings? Message-ID: <20040525192254.GF7832@blorf.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 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..