From patchwork Wed Jan 12 09:57:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 49912 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C465393A43F for ; Wed, 12 Jan 2022 09:57:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id AF018393A413 for ; Wed, 12 Jan 2022 09:57:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AF018393A413 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DD6B0212C1; Wed, 12 Jan 2022 09:57:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1641981450; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=blIyN1CiNGq8DFm0xtXIfRDiwZPk/kzColOEwb9oHLs=; b=e0Axy7u0lgkRrl0jFEs8RtaXBm2aMxDauL1EicU/xpxUqT97mCvZM5ZQRp5VnFxXm2woeX QCF+gw9Xr/M+iv0BZr1OEwvAGAo8gU8/s9BJ7rFZiFj3+6l2KmL9YKBAzCWQasvgMZZuQN 0LP5hxn8q4raiMFTGw5s/e/qkqPY5ug= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1641981450; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=blIyN1CiNGq8DFm0xtXIfRDiwZPk/kzColOEwb9oHLs=; b=bq+sqIYjRBLzqMZ9mCdkNkwfj4Ms6Q9kg3R28XcYXZzchygkg/jD37sYDerlW5JprbV9Rx 79i7pS2ZwBtzWoCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C9ED313B42; Wed, 12 Jan 2022 09:57:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uelKMAqm3mFBWgAAMHmgww (envelope-from ); Wed, 12 Jan 2022 09:57:30 +0000 Message-ID: Date: Wed, 12 Jan 2022 10:57:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] epiphany: fir -Wformat-diag. To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gnu@amylaar.uk Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This fixes -Wformat-diag warnings. Ready to be installed? Thanks, Martin gcc/ChangeLog: * config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute): Use %qs format specifier. (epiphany_override_options): Wrap keyword in %<, %>. --- gcc/config/epiphany/epiphany.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 88283419dc1..c9c321560de 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -520,8 +520,10 @@ epiphany_handle_interrupt_attribute (tree *node, tree name, tree args, && strcmp (TREE_STRING_POINTER (value), "swi")) { warning (OPT_Wattributes, - "argument of %qE attribute is not \"reset\", \"software_exception\", \"page_miss\", \"timer0\", \"timer1\", \"message\", \"dma0\", \"dma1\", \"wand\" or \"swi\"", - name); + "argument of %qE attribute is not %qs, %qs %qs, %qs, %qs, " + "%qs, %qs, %qs, %qs or %qs", name, + "reset", "software_exception", "page_miss", "timer0", "timer1", + "message", "dma0", "dma1", "wand", "swi"); *no_add_attrs = true; return NULL_TREE; } @@ -1538,9 +1540,9 @@ static void epiphany_override_options (void) { if (epiphany_stack_offset < 4) - error ("stack_offset must be at least 4"); + error ("% must be at least 4"); if (epiphany_stack_offset & 3) - error ("stack_offset must be a multiple of 4"); + error ("% must be a multiple of 4"); epiphany_stack_offset = (epiphany_stack_offset + 3) & -4; if (!TARGET_SOFT_CMPSF) flag_finite_math_only = 1;