From patchwork Thu Apr 11 10:43:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 787959 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp157938wrm; Thu, 11 Apr 2024 03:46:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0GYr1BAMqeH85ZHoZu4BcGWeBZk4w4vDbo4/b9RzimBi4ssGD3aXlNCPrPCW8DWKvFYCwPlBpZVt8c93dCEr+ X-Google-Smtp-Source: AGHT+IEIZXsD3sXC4vJjBWPKIWQkEKabJp2w/VdKznQvioqI5VIml4Wm9uC9vLnsyN9VSQHEAclG X-Received: by 2002:ac8:5dcf:0:b0:434:d447:1e79 with SMTP id e15-20020ac85dcf000000b00434d4471e79mr6368827qtx.24.1712832412862; Thu, 11 Apr 2024 03:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712832412; cv=none; d=google.com; s=arc-20160816; b=puQJPd9QRIyaTTdlQUu94UNPvibnJWs5DJpuTPvg+zFRQ82sk0eWk619UdIwEQhXva 6FWc6qyvmMHfNoL9q6fB1WRh3uk+MmDQ+lVvzZNacETJGpPoppDbRTM7ZK96NDiWhnZ5 YDGA6SbzR4MS2qpVKhhUePgNMt1Vl5pHxC1U0VKWUgxqKAD84nPjsQSO83SF+cHXADTc i6rdYm3jlafYMwC9wv96/sxgDXS2XKuEXZZlzb8GPFB8jUfM0rR0ZfivB/kdPxThPZSq N/6nPirVCBG599Zhpf6mwaFfsVQs1mLjn7zEg3wfBCxQsNVg/kerSvxWPcsNJmeVCQ5s 7y/g== 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=7EwoYTZWhIpfsU+7LZSduNtPHyEqtMdnhAHnqEMdyEo=; fh=nfhhA+1kKK6RAzB8lGiU1j/8iUzwhWVCGvtW5ifjQSU=; b=TbYjKVfVpJtzqhTYe+uBMJwxvUc+B18PttSTHS4xrmVpboFfUCecJh+rVO1DPfRLi+ RlwE+YcMkyLMpn17aURR/6DqfqjcsUEqT5N7GAy2APyGIvlp2sCAEQvx9kABdgqZbnQv bcsrp407Izh5zTB7cxREhVqqro9KvnwgWNagEycoiwmbm9D541oHqQ91bkRIU0fI1utv TgxAPXNq9n3mOVClQivlJhzvbSFCLLk6xH50hUqgJsRGzUHPKUSpiia1FqcPYJrGqqu4 uK2GzSGosNJpwlNFHyiwNkmI05Bn7GOmGUCc+WStjHQYm/nd38m2Nia1k62Z78sZoYV7 5McA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pjFWku9G; 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 p7-20020a05622a00c700b00432c27b3897si1270742qtw.97.2024.04.11.03.46.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2024 03:46:52 -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=pjFWku9G; 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 1rurvC-0003VC-7C; Thu, 11 Apr 2024 06:44:46 -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 1rurv7-0003RF-Br for qemu-devel@nongnu.org; Thu, 11 Apr 2024 06:44:41 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rurv5-0004U0-Ay for qemu-devel@nongnu.org; Thu, 11 Apr 2024 06:44:41 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4167fce0a41so4156325e9.0 for ; Thu, 11 Apr 2024 03:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712832277; x=1713437077; 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=7EwoYTZWhIpfsU+7LZSduNtPHyEqtMdnhAHnqEMdyEo=; b=pjFWku9GGDFunh+xiDJKrJoNwOncYxEhPgPFW/6HAh1FpE4veygPGMaolH95MWsOdY dczW0gxf+aC/ehQ5YloRE2RUJWyh46d/9UpShf6BuxEf7HIqFJ0oGhsGPAf0AgVZV+EP 7A1+y+HE8226hc/bGkex6Secn1oUCs25GtxtHG5r2ByGpoYVkVaKlvHHZZa+/7Gq+hkY Q+1egHchIQuxqETlCUcHYS6sTOzTMDMHCZKvPSZepPJ5By5GzlNpAEgwR4Gzuoboa8EH Wogdb1GFU+NR6pY/oD1Fuo66eJcXz0WU+EExULLUXiVxiHJKtkp59KKA0deTKBv0dx3k 5DUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712832277; x=1713437077; 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=7EwoYTZWhIpfsU+7LZSduNtPHyEqtMdnhAHnqEMdyEo=; b=RFNHk7Nf+K3U2AJb/y8+wpCDsrW8RfdgwVI20JCFTmCBn8E5jILvgToGAlafTjI8pr JRvce8TtqJE93GdDuCVSN2U+FcI7fLtjXkSy1WFmrrQ1r8A8azII1SFxUoVsqMTi3Ot0 NEusEH92clSxBcxk9weqmnxzYRSijNFy3aMzpirJz0daUSF/kxBW7VJ920F3IHCeplwJ 63XmQl2D4s7lIvLbPQHAk4YJz9wTH6dNADntGkZow4ubQkARbwbUHJVOjUqE1mT4wq0s xSByhnnvuICwQxVh5v7m53jTaHjFQXGEm/FtRsjl/nKsEz7rcXqi+dqqLMHGAbLuOHJJ OHfw== X-Gm-Message-State: AOJu0YykVVh9WZmKrf7S+hFvuTCqUPa3YYOn/HsyaK6xtN2AbPQYF9G/ n13OQMwz+0P4V+h6Bm5tH9LDP2/RqY6ehucAkNoGAHRCEi0tt0eAZRqVDL6cpH0KmkxRbYC/EgZ v3tI= X-Received: by 2002:a5d:644e:0:b0:33e:6ef3:b68e with SMTP id d14-20020a5d644e000000b0033e6ef3b68emr1785788wrw.34.1712832277566; Thu, 11 Apr 2024 03:44:37 -0700 (PDT) Received: from localhost.localdomain (137.red-88-29-174.dynamicip.rima-tde.net. [88.29.174.137]) by smtp.gmail.com with ESMTPSA id q9-20020a5d61c9000000b00343d840b3f8sm1463776wrv.33.2024.04.11.03.44.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 11 Apr 2024 03:44:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Paolo Bonzini , Marcelo Tosatti , kvm@vger.kernel.org Subject: [PATCH 9/9] target/i386: Replace sprintf() by snprintf() Date: Thu, 11 Apr 2024 12:43:40 +0200 Message-ID: <20240411104340.6617-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240411104340.6617-1-philmd@linaro.org> References: <20240411104340.6617-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=unavailable 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 sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/kvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index e68cbe9293..a46d1426bf 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -5335,7 +5335,8 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) case KVM_EXIT_NOTIFY: ctx_invalid = !!(run->notify.flags & KVM_NOTIFY_CONTEXT_INVALID); state = KVM_STATE(current_accel()); - sprintf(str, "Encounter a notify exit with %svalid context in" + snprintf(str, sizeof(str), + "Encounter a notify exit with %svalid context in" " guest. There can be possible misbehaves in guest." " Please have a look.", ctx_invalid ? "in" : ""); if (ctx_invalid ||