From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19534 invoked by alias); 22 Apr 2012 08:23:02 -0000 Received: (qmail 19521 invoked by uid 22791); 22 Apr 2012 08:23:00 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Apr 2012 08:22:45 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3M8MiEe003985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 22 Apr 2012 04:22:45 -0400 Received: from host2.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3M8MfZ3008859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 22 Apr 2012 04:22:43 -0400 Date: Sun, 22 Apr 2012 08:23:00 -0000 From: Jan Kratochvil To: Sergio Durigan Junior Cc: gdb@sourceware.org Subject: Re: Switch -Wunused-variable on? Message-ID: <20120422082240.GA21311@host2.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00172.txt.bz2 On Sun, 22 Apr 2012 09:14:44 +0200, Sergio Durigan Junior wrote: > However, before continuing to prepare this patch, I would like what you > think about enabling -Wunused-variable by default in the building. There are more useful -Wunused* options, GDB uses now: -Wno-unused -Wunused-value -Wunused-function IIRC the counterargument for -Wunused-variable was that GDB contains various #if-compiled code where is a nightmare to get the code right with matching #if-clauses also for the variables being used by various #if-compiled code chunks. I could not find that mail now in the time I gave to it. I believe more -Wunused* would be worth it, maybe the mail was before Joel started to disable -Werror for releases so that claim about problematic #if-clauses is no longer valid. Thanks, Jan