From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 21AEF398546C for ; Tue, 15 Jun 2021 05:11:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 21AEF398546C Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 60C16340E85 for ; Tue, 15 Jun 2021 05:11:44 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 6/6] sim: mips: add printf attribute to trace func Date: Tue, 15 Jun 2021 01:11:41 -0400 Message-Id: <20210615051141.4801-6-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210615051141.4801-1-vapier@gentoo.org> References: <20210615051141.4801-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2021 05:11:46 -0000 This helps catch format errors in code, although they're all clean at this point already. --- sim/mips/interp.c | 2 +- sim/mips/sim-main.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/mips/interp.c b/sim/mips/interp.c index fc7b00324ffb..64e6d28dd52f 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -1722,7 +1722,7 @@ dotrace (SIM_DESC sd, int type, SIM_ADDR address, int width, - char *comment,...) + const char *comment, ...) { if (STATE & simTRACE) { va_list ap; diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h index 8c9abfa0b0b3..990573996bb9 100644 --- a/sim/mips/sim-main.h +++ b/sim/mips/sim-main.h @@ -965,7 +965,7 @@ address_word micromips_instruction_decode (SIM_DESC sd, sim_cpu * cpu, int instruction_size); #if WITH_TRACE_ANY_P -void dotrace (SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...); +void dotrace (SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, const char *comment, ...) ATTRIBUTE_PRINTF (7, 8); extern FILE *tracefh; #else #define dotrace(sd, cpu, tracefh, type, address, width, comment, ...) -- 2.31.1