From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id ED4BF381F732 for ; Thu, 20 Oct 2022 09:36:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED4BF381F732 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 4C8BC300089; Thu, 20 Oct 2022 09:36:03 +0000 (UTC) From: Tsukasa OI To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Cc: gdb-patches@sourceware.org Subject: [PATCH 18/40] sim/m32c: Stop using middle dot Date: Thu, 20 Oct 2022 09:32:23 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2022 09:36:06 -0000 The led_off array used 0xB7 (Latin-1 middle dot) but it heavily depends on the source code encoding. Directly using 0xB7 here is very dangerous and Clang causes a compiler warning ("-Winvalid-source-encoding"). On the other hand, using '\u00b7' here will assume UTF-8. As a workaround, this commit replaces uses of 0xB7 with '.' (regular ASCII dot). --- sim/m32c/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/m32c/mem.c b/sim/m32c/mem.c index 5bb9dbf2c29..a412f81b2e9 100644 --- a/sim/m32c/mem.c +++ b/sim/m32c/mem.c @@ -221,7 +221,7 @@ mem_put_byte (int address, unsigned char value) static int old_led = -1; static char *led_on[] = { "\033[31m O ", "\033[32m O ", "\033[34m O " }; - static char *led_off[] = { "\033[0m · ", "\033[0m · ", "\033[0m · " }; + static char *led_off[] = { "\033[0m . ", "\033[0m . ", "\033[0m . " }; int i; if (old_led != value) { -- 2.34.1