From patchwork Tue Jan 9 02:27:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83588 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 35962385842B for ; Tue, 9 Jan 2024 02:27:39 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 1D7563858D38 for ; Tue, 9 Jan 2024 02:27:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D7563858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1D7563858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704767236; cv=none; b=WBbOihkU0p0n8SXuIiUT3SSVbZQ2UDskPUOfm+gBA1oBDhRGildAcO3sGdhk2n0wj8yJMkVIS55o50Ym2+OwyfkKVfFkLQJMgm+csuaD4lLuPgVc8KVeiKf8rX+RbosDoukYlpiwhXyjhlXnKPtTtzrkLi38niQJB+Y+szwVFUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704767236; c=relaxed/simple; bh=3y0vv3g/wOGHUp/6TVnIy7Sq4wq6TLJlAQa2DxxTCbA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=tI9PkNaxwUWC1EVyYmLL3w7saSw52ntddyIfJBRM5vH1JS8gucxLTsUyHn8t65UA85ZYiQwu3qRUNYdHPnJWdH736+4eSmQuJwzrtun0yMf7VC8R5nv/9Z3/yq+20qOPElyyPz9m7GyKTgZyBp/6b8pcu6+xFUSVa3LqbP6cg+s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id AE010343274; Tue, 9 Jan 2024 02:27:14 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: igen: fix format-zero-length warnings Date: Mon, 8 Jan 2024 21:27:12 -0500 Message-ID: <20240109022712.5162-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Fix warnings from calling printf functions with "" which normally is useless. --- sim/igen/gen.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sim/igen/gen.c b/sim/igen/gen.c index 2176b603fc59..30cf10770334 100644 --- a/sim/igen/gen.c +++ b/sim/igen/gen.c @@ -67,7 +67,11 @@ print_gen_entry_path (const line_ref *line, if (table->top->model != NULL) print (line, "%s", table->top->model->name); else - print (line, ""); + { + /* We don't want to output things, but we want the side-effects they + might have (e.g. checking line != NULL). */ + print (line, "%s", ""); + } } else { @@ -1242,7 +1246,7 @@ gen_entry_expand_insns (gen_entry *table) print_gen_entry_insns (table, warning, "was not uniquely decoded", "decodes to the same entry"); - error (NULL, ""); + error (NULL, "unrecoverable\n"); } return; } @@ -1385,7 +1389,7 @@ gen_entry_expand_insns (gen_entry *table) warning (NULL, ": Applying rule just copied all instructions\n"); print_gen_entry_insns (entry, warning, "Copied", NULL); - error (NULL, ""); + error (NULL, "unrecoverable\n"); } } }