From patchwork Fri Jul 5 15:30:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810409 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525211ltk; Fri, 5 Jul 2024 08:34:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWAlrPOSCCb5oaTgJGPu4rhQWz26QNpfVuRBrIwDP8P+whryPZ/aGWJpht+wHHhtGDdhzkAdCsu2mAYTbJlfd4H X-Google-Smtp-Source: AGHT+IFjb88uTvQOLH4Pc9pQHiH2RK1Zvz27u+r8BEnm1FzJUq29Axf8+GtVRKdo2DKmDPQGY32O X-Received: by 2002:a05:6870:82a3:b0:254:9182:180b with SMTP id 586e51a60fabf-25e2bb7af3dmr4111592fac.29.1720193694752; Fri, 05 Jul 2024 08:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193694; cv=none; d=google.com; s=arc-20160816; b=nb5Y3WxkL7nVTAHM0uywZIW1ZroEAUXPdZP9vJDK6TumA8CqdBnN5Xb9SgpkBdiWeI OqfhL0OiD1GVJHZmQCW9zcD54k5SU7vM2MrenfyuIbBvpaRwKhZ+IDhgd7CUb2m0xF8S ui39I7NKOH8md6yXQ4+7HGjOZouQPC9mRtRGp8PzrZgwhm5QilkEn+ch+S0cIMEUxRRM XNiI4xrCvYTC/ssimku7dqaNP3swGaMUdGGWaNhWTsnG/1NMSsGnQC3o3YuOwJdwXExT X5GEMB0Fibi6HNVGULTt9iUPBDyw7wMRQblyuZAIocyrqz6wp78z1QW4PYf+gAO9LBF8 TkAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xv12aEHcacHy909xjN8SHkQelk6UZTRk75aOEyUvjoM=; fh=9XduUmIkBvYIbwkqrMo5Pxk5m1/cMYk6ZohD+0duq5Y=; b=uzoelywRhbh9LWhsWkW+0D6IYpHdyU6rt+N21W3AK68x9aUcnkzWcyu28spSc7j8dB HpnQU6UhaykyZBh1ZIl/AAmtWNDphnrv0P42A+gybaYEEzHpYrlJUbUsXDGXwzXPDCl1 U938Sgk68aFnJS5sSIIuLqdfpj7e9cruFOafCcyLgliygfthxWy7VQSXBAcFZDzTWth8 XAc9fgSoVn9DWY199CIJ1l1PDcDumkik8HIp/oljvJJiDAoH1r7+kMbAp1FBIgv2a4rV VDtq4f4AizCgzDzTcixK7icCLC2pHDJ8WcCvk6WtFp9CCpknjanszLd/Nnz98fF5LyzX 3kww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w+dG1OpS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b5de38de36si70889046d6.359.2024.07.05.08.34.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:34:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w+dG1OpS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPktv-0005dH-KO; Fri, 05 Jul 2024 11:31:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPkts-0005bs-71 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:04 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktp-0000Nb-RJ for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:03 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-57cd26347d3so2426452a12.1 for ; Fri, 05 Jul 2024 08:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193459; x=1720798259; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xv12aEHcacHy909xjN8SHkQelk6UZTRk75aOEyUvjoM=; b=w+dG1OpSGb+cNSmjPl20J3Nj95hNAbuTUE9QlFAmmHh2mgHm0Gwd5j/MTXEsGsKkYT /OdOFaOQfDufFYTXX7/DK1QM7OBVGcj8M/TazCTPJgyZS33+2a2gv3hWlzIlLQRtt79Z sXvUbdrLsPKKQCzofexVoHHyYakNThhcH7BVPG1HbDQn+/ItAe4DYy/5f1o5cM/eoBKB Q8qhuBqHJCYm2JArLKNdw5Hwdir1rzIUFY+l/Ft4HXEcZK/mJMJ0XiJugSBQRLGSkkOw cLEY0yjITDQOjCHPEkoTwxXPNR1BGHxCU6UDnBiFD5Wo6Jf2Z4veUtzgJtIl10tTGaNA nLSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193459; x=1720798259; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xv12aEHcacHy909xjN8SHkQelk6UZTRk75aOEyUvjoM=; b=pFhz0yynPjjid1/LPrmb/C+7ucXWzT5Y/My1R4gh/KoqeQaLimtwYXca4Ue/Kcmldl /L2OzOtYooFZJmfPOPu1SbzvsmS7l7Fyz1gEADCyf/ftgpd+J0E48hikmLgynY0yJU8F gLR8Ik0vHJ/M6wzFVs9v2wLoPbUa41rq0vrHRdK1lI8sIWtH5lqN0z7y5frw7+hHs2j1 VVSkWquTTFaTgoPMR8MB3Cg5pKF/RN5POTA+eqeS/DVGOVsnsAEbS9QHm0RTMPJ5oIzX HvG1Nu90AdjGCjWImVHySC6+XQN5JzGNqzJNJGo3xPkBWHR4eCHVUP1f3PS4opVz3B1j XvSQ== X-Gm-Message-State: AOJu0Yy8TAG+t+BEyfT2Q2eNhnCQuet3Q1RCpx7PrrfKoZ/FLLfr9O/6 GedDt21uVrwZtYJWmj2nZtOkHutHdoT+V3dy4D0D/G6Q7/F6NcSdRSOclVCVKy1XGPye6+HHoko w X-Received: by 2002:a05:6402:1cc1:b0:58b:4621:e866 with SMTP id 4fb4d7f45d1cf-58e5cd12b99mr2738756a12.41.1720193458578; Fri, 05 Jul 2024 08:30:58 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58ad8730dcfsm5495220a12.7.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 909875F93A; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 06/40] tests/tcg/minilib: Constify digits in print_num Date: Fri, 5 Jul 2024 16:30:18 +0100 Message-Id: <20240705153052.1219696-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson This avoids a memcpy to the stack when compiled with clang. Since we don't enable optimization, nor provide memcpy, this results in an undefined symbol error at link time. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-2-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-7-alex.bennee@linaro.org> diff --git a/tests/tcg/minilib/printf.c b/tests/tcg/minilib/printf.c index 10472b4f58..fb0189c2bb 100644 --- a/tests/tcg/minilib/printf.c +++ b/tests/tcg/minilib/printf.c @@ -27,7 +27,7 @@ static void print_str(char *s) static void print_num(unsigned long long value, int base) { - char digits[] = "0123456789abcdef"; + static const char digits[] = "0123456789abcdef"; char buf[32]; int i = sizeof(buf) - 2, j;