From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115218 invoked by alias); 13 Apr 2016 21:03:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 115200 invoked by uid 89); 13 Apr 2016 21:03:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=personal X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 13 Apr 2016 21:03:05 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1878A64060 for ; Wed, 13 Apr 2016 21:03:04 +0000 (UTC) Received: from localhost (unused-10-15-17-51.yyz.redhat.com [10.15.17.51]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3DL33Gv015177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Apr 2016 17:03:03 -0400 From: Sergio Durigan Junior To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Avoid "format not a string literal" warnings References: <1460574365-21910-1-git-send-email-palves@redhat.com> <8737qpp8sg.fsf@redhat.com> <570EAB47.8040102@redhat.com> X-URL: http://blog.sergiodj.net Date: Wed, 13 Apr 2016 21:03:00 -0000 In-Reply-To: <570EAB47.8040102@redhat.com> (Pedro Alves's message of "Wed, 13 Apr 2016 21:25:43 +0100") Message-ID: <87y48hnrw8.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00308.txt.bz2 On Wednesday, April 13 2016, Pedro Alves wrote: > On 04/13/2016 09:12 PM, Sergio Durigan Junior wrote: > >>> if (alias_argv[0] == NULL || command_argv[0] == NULL >>> || *alias_argv[0] == '\0' || *command_argv[0] == '\0') >>> - error (_(usage)); >>> + alias_usage_error (); >> >> I'd call error directly here and above (and yes, replicate the message), >> but that is a matter of personal taste. > > OOC, is there a reason for that preference? Just avoiding a one-line-function call, and the fact that the message is replicated just twice and will likely not change. > Instead of replicating the message, I also thought of: > > error (("%s"), usage); > > but it seems slightly nicer to me the way I wrote it ( obviously :-) ). For sure. I'd say go ahead with your way, no reason to bikeshed over this :-). Thanks for the patch. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/