Received: by 2002:a17:907:6195:b0:a52:fc6:5c40 with SMTP id mt21csp413622ejc; Wed, 10 Apr 2024 09:07:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUueYXQQqpSSbx+5qnNthlc7GKKl9ARfx0hDsrKsHzYJsmlZYvpyIcFaXWrPtsHIp+AZZgS0hJzpVTS4I2Dbu4c1m6yyNN0 X-Google-Smtp-Source: AGHT+IGRtnbgdd2Ziat+c+VvarvZRt3YrbZXs7SDd0XO59W2g3XKMoYX3591CaBIR47SLUCoON1w X-Received: by 2002:a05:6214:20cf:b0:696:9255:b787 with SMTP id 15-20020a05621420cf00b006969255b787mr3254075qve.9.1712765252379; Wed, 10 Apr 2024 09:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712765252; cv=none; d=google.com; s=arc-20160816; b=fjY+1CuHJXcJ1/wJXTpi2x3SlMYJrYn5H4u91oE51fkJDhDeNS8p2YfQwEkhpVG+zi trAj71wxH059npq7hLClQOnLZuv2N40YZ0FTvRj91fcJWx9WXeoJ1iDVJyd2ZA5nyY9T 2+v3CZJkaV4m/fHhdQNUuPDU26U4TSMmDJEFmT2PTN8LlZqZiXVFas+OMmBT6cdyMpsi oO8FxwFFeUYdONirt1ibbWOeur/sM8zFu9DPpVltwCSDKV8nHNG+PwSH+8Z0NrRLrq59 IzKYw0D3rNlpIeWvx4XDn6+lT74zwtmdgW65tHHFD3hgzcmEa66H8JuOw3Zgko6lNMmO JP4g== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=Qtkg4POGe6isMYcrXvpVF2IG6m9MMiveeMLsCwcT+VQ=; fh=p8yoxHa5ML4mJnXWYGUfW3W4flmLPcqyR+rvhpg+zLE=; b=IRWCJBiTRsd9ABLT4ESu6UBNVBn9WAhPeDrRnkjv30qt7oDW8sYfhV3HmoL3Q+Op0u sARfOPnBFPdYwHhhdZjui4247ZA04AGwDdR4TfVege34zH7PXtxgC0zZTzTBetddBjEo iKoNpGHaob3PV4uxRxwf3r/YXQRGoNnA71GhMa/gLzX6BLiaRKFO9aa+gq4nx3rXKR8n wLPwD6WrRRgbUtgyFYM5Fw9OkDd6NbGoDZKrKlVvCQp/Qv2h/tfT7He37oboOnRVgFxL VD0fIOZ+pvdGqYi15wbhJe5XNGlnRqcbaniVBaBga8Bd7/cFRpHjAjeenBv4Q2bmm21r cFzg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="G6Tg/+7v"; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=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 et12-20020a056214176c00b0069935f02a8bsi12691077qvb.387.2024.04.10.09.07.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2024 09:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=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="G6Tg/+7v"; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=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 1ruaTD-0000CQ-VX; Wed, 10 Apr 2024 12:06:45 -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 1ruaT0-00009p-24 for qemu-devel@nongnu.org; Wed, 10 Apr 2024 12:06:33 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruaSv-0002Yj-GT for qemu-devel@nongnu.org; Wed, 10 Apr 2024 12:06:28 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-56e23bbe06bso1765346a12.0 for ; Wed, 10 Apr 2024 09:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712765177; x=1713369977; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qtkg4POGe6isMYcrXvpVF2IG6m9MMiveeMLsCwcT+VQ=; b=G6Tg/+7vqom4SNpdVIX70ttnwcSqmozkV4XRrB62f/sBjYNHlDrAeIM0oE/kR+KBma q2Vln2RLSFBrBYt/g1N/OsR1qBRIYblNhYQpEdWKX0JRQJtDWH0hziAN+CCCMx79vSyG cPjDX3eigUsYmdAxgnMJwvr9/KZiv/78jjfBDZnTf+NODkuJKuPHx3zJz9bsbxSOXw0y LRoVSBldmYdvnvd9kVfszBe2d2uN9Og/JltDYrjC2bbzoEG7KPrq/ZDWaq8nn+IpyFL/ R8VoJIrWOt+ERWf44wIe8zKMD9cRMtSstpoknlkvMc39a1UZqX54KbzErvKUYJETPjdn RNpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712765177; x=1713369977; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qtkg4POGe6isMYcrXvpVF2IG6m9MMiveeMLsCwcT+VQ=; b=iCeidnlZ1nCQiCuolOLjt0DerXu6GNqG/d2BAhlLmWAflJbrQdmfCGc5npTBtc8KTH YlRvqEwybfJIw6yGFLsEIH3LLYpOoYKTw6fiPfqmJPmL+TxKvBfibTK59SMcXOnramJy R5Vkls/joYxNZr4C3MIZd+68uEXRbgKpRj46/usAOwewIglXuseEP/GffHUSuxpjHtU/ uH5Wpv2j86dNMTdZbT4lLwc9rUj+ibmy8jSIPbZOjJ6/syhb2nM4o9urKwaUnTVyOcWD 7eUypQZ7u5/WvIEW3CmCcM2Vgck0iqfM45NOO/gQ8U19Tj+MgVOFlQjxsxX6KPQy2dyl 18Lw== X-Gm-Message-State: AOJu0YyRJ4SaY28SDtxLLZg00gxScesS9+A8LddsnNqlaN2Uxs0zWHyQ Dve+LnB4rw6BsYDFC3Q+3BbWuu+A3LTti7JcsDjTLEtwWtXhxPV4EtGyxPm7fKRRGHVobgz88x/ A X-Received: by 2002:a50:871c:0:b0:56e:3088:49a with SMTP id i28-20020a50871c000000b0056e3088049amr2567624edb.37.1712765177225; Wed, 10 Apr 2024 09:06:17 -0700 (PDT) Received: from m1x-phil.lan (arl95-h02-176-184-34-173.dsl.sta.abo.bbox.fr. [176.184.34.173]) by smtp.gmail.com with ESMTPSA id i2-20020a50fc02000000b0056e22be831dsm6544900edr.42.2024.04.10.09.06.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 10 Apr 2024 09:06:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH 00/12] misc: Remove sprintf() due to macOS deprecation Date: Wed, 10 Apr 2024 18:06:01 +0200 Message-ID: <20240410160614.90627-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: 7iwiGOyQjfGb Hi, sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Suggestion to avoid the super-noisy warning on macOS forum are [*]: * use -Wno-deprecated-declarations on the whole build * surgically add #pragma clang diagnostic around each use. None of these options seem reasonable, so we are somehow forced to spend time converting each sprintf() call, even if they are safe enough. I'm so tired of seeing them than I started the conversion. This is the first part. Help for the rest is welcomed. Regards, Phil. [*] https://forums.developer.apple.com/forums/thread/714675 Philippe Mathieu-Daudé (12): ui/console-vc: Replace sprintf() by g_strdup_printf() hw/vfio/pci: Replace sprintf() by g_strdup_printf() hw/ppc/spapr: Replace sprintf() by g_strdup_printf() hw/mips/malta: Replace sprintf() by g_string_append_printf() system/qtest: Replace sprintf() by g_string_append_printf() util/hexdump: Rename @offset argument in qemu_hexdump_line() util/hexdump: Have qemu_hexdump_line() return heap allocated buffer util/hexdump: Replace sprintf() by g_string_append_printf() hw/scsi/scsi-disk: Use qemu_hexdump_line() to avoid sprintf() hw/ide/atapi: Use qemu_hexdump_line() to avoid sprintf() hw/dma/pl330: Use qemu_hexdump_line() to avoid sprintf() backends/tpm: Use qemu_hexdump_line() to avoid sprintf() include/qemu/cutils.h | 17 ++++++++++++++--- backends/tpm/tpm_util.c | 24 ++++++++---------------- hw/dma/pl330.c | 12 +++--------- hw/ide/atapi.c | 8 ++------ hw/mips/malta.c | 22 +++++++++++++--------- hw/ppc/spapr.c | 4 ++-- hw/scsi/scsi-disk.c | 8 ++------ hw/vfio/pci.c | 7 +++---- hw/virtio/vhost-vdpa.c | 11 ++++++----- system/qtest.c | 8 +++----- ui/console-vc.c | 4 ++-- util/hexdump.c | 33 ++++++++++++++++++--------------- 12 files changed, 76 insertions(+), 82 deletions(-) -- 2.41.0