From patchwork Sun Dec 22 00:04:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852894 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2772477wrq; Sat, 21 Dec 2024 16:26:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW/HBYLkmykQQ6iWTAesl+txm4XA4AI3GgfrQmfPzet1rqiAPzrD8S17RYGNrUU5YNBKapOEA==@linaro.org X-Google-Smtp-Source: AGHT+IHV7oCLzcp2G+QnnaK6k3GLsm7OhfevDDwtwIFn0OIGC+XMmi93kRAflLnbZ2N5hOiPaZgN X-Received: by 2002:a05:622a:1a07:b0:466:99a9:c354 with SMTP id d75a77b69052e-46a4a8cc49cmr140472551cf.22.1734827181102; Sat, 21 Dec 2024 16:26:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827181; cv=pass; d=google.com; s=arc-20240605; b=c034DU+M5ERLDWAk2sNHWfOVw53/LdKjQkz8eMJ1viTcOqdUNx4mXjpfc2O0fyWRp7 w13QJYWUW6XzrEiKKCZcTDiHhRPUrQLiP3GzQLDNy6LK0PmeRxCFsx5Lvukt4ePOPGlH oOMzQ4OAWct37nwyKdRzpvpcdwIt85IcZp+zxz34DRyMeb7Nr7zFRZ70+oj+YGrfF0ge J1Xi/GzPSeJEt3xPkfSsDep9d+R65TX+blQ7mqM8Q1cWOvrOwg9i0+Pa0YgSf2IwEca/ EQAQnGQ3XsMw3Is3BhIWEmlxl+IeRT92E4QA0U2RgoHIKxS8gPzj6oIGYa21xdBzaAr+ XMlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=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:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=Cz3JwGlOCBIOSYp+zi/uZDJi2iX0p9V1j/DCExOeaT8=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=FiWvCRTZORHikcw/zDR/xPLbJt9bmtz/PbDYo/s3yiv6+mRKJ1iUCH1fBwVasCBdSk /LrfozncEhrgZnVbuW0DnIG/st9La4XoifUkY0+5jfcrgUeC1P93zSCQ+XSg/7bW4SgK b5Mfry8OqCVZJ1ftHr0/8SHVZGKhUCZT/AbI74kp1gd60CTWhtdxsBTyDdr99vkX3cy6 /1GlvUcBqt801JJzjniYAjkgLL39a2EyHKOoRj6JxFCHnQybzMrfemphCDEfkh5QAhzk A5it/QsOvS8pVhdulsec59yna21Vw+gejeQ4Kctvx9H/nxmBUzjoQVSjkHIye7TnZdcN P/Mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d9hd7ZlU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ebd5ad8si79920841cf.503.2024.12.21.16.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:26:21 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d9hd7ZlU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28D8A385840B for ; Sun, 22 Dec 2024 00:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28D8A385840B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=d9hd7ZlU X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 8D1453858D3C for ; Sun, 22 Dec 2024 00:05:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D1453858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D1453858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825932; cv=none; b=wYnSC1hTJtE/I0cgobBKDanEypGDtFivqjMjYnrto7IALVgRJMjzpLAUpa1yWZFextPaBgUSiGRr5FRoF4P7H+cB5JV2sDZDytVeKslFJ9wmpQVNRVQa78FE33mKINHeAH9+CQGDw8yL+GWPEPbN4R45zVwIgMlaKMTb47Mfhe0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825932; c=relaxed/simple; bh=hz7kEMnANDL6blh70kpqASKdQiMACKrrIDXnCkehVC8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qDFRlUwRV7FY2kO/lbQ5F90VLOtB57IgFdcYPfbo+LPHGaKhOkJJ5Evj34MeDuoAnnb5k6bfPxHLvLHyp39rRrAN2ZtZzo/1gWUgfTPs6FyHw//mzRM4mmmuYhSJxQx9hXA9RIK8AyzfZVpqnsgj611TZEzE2ykjtPAKgovSY84= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-728ea1573c0so2629052b3a.0 for ; Sat, 21 Dec 2024 16:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825926; x=1735430726; darn=sourceware.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=Cz3JwGlOCBIOSYp+zi/uZDJi2iX0p9V1j/DCExOeaT8=; b=d9hd7ZlU5zmRX0o9W+NX47fyoVfmEIkX1I0LLSNfg6EQqsaqKRKJOGPc7qDgaP+20K wojfeWEBIRg22TPXHQt8Ot6WuZJSsc27qoihcfjQXkUosJexnERl7+0uzHkaBcf+B/lv /kFYoCyl8aVm4ie0zBDxYLo1ZLP4BIeh9a7y/hKdkKJURSyKIu5vrXMc8Eec7W+kyl3C MrDO6l815XXXu8WqJP84XEcTrEu9NmV+bcwzjAe0UWp09VAAog9OPbTYqpiHX0y89c3V 91VoImReSRryI+6FB+ZR3aqnhsX0mwQ8Jh4LjuKZil+Rw95bWbw9DcBC6HF7cdWEZhGf zdGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825926; x=1735430726; 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=Cz3JwGlOCBIOSYp+zi/uZDJi2iX0p9V1j/DCExOeaT8=; b=tYfa0KvmlAYWc9stGjv5obEHi3mtF5ZosUKWLsU1wGa4gLS59qcDatMeXcGBMGHMhZ bG6cpt4EHa7cKlRk6Wftfadqe6EeVEVsVJBSd7zThQ+/KkUHJ7pp1H5kWPqmz5Tqi769 5UY3LkrzKoUS2aAuyqxugwmXOzrAm0Y46SRLzYm+vho5xueB3F7G2DFwwQPK8E3LDViv CllJdbl66r/vAMVtFYoZUKxbI38JLX5KULLuK1RY59JT0Bbp3UkaBvk0xqGAJlCQuLNO KlXH5oQ9xszZ3JCQPy8FsU162vJE1wU+O0kn38L+8fprsWQu/F05jn5Df5YDNbhKaKq0 a/Kg== X-Gm-Message-State: AOJu0Yw4HcCwLPKvPsUde/M6V6sww4GCKPqYasos7Y4C8RQWT+19pqEp cEjWqg0oBeX4rhECut0XVwX5du7nQn29yy9kKeJHCXXN59y5qejW X-Gm-Gg: ASbGncsuTHpxcQDlSx40WSS9KCBLi9j0DXLthYB7jqV2T6bfkhidYGi1s1h/PC3X2RL x3zevEECOKE5rxN7EkwTY1sWjufSZBo6XOd+mVntiJvDNJJyZcgSVZNMdgHdlBaFQqL6bEROinx 1PCc3B+6Jlxyi/tiLKK2w8kDcW9QCJxePXDlt4D58kgZfftkskR+Cq8vDUYTgwLlNmETlUIucPK fCaVhzDIrpMN5EuHD2ODmwUXE1xVuDCz7A7WRCxQ1yFjyuh99rTxBAzhbJkMtUWKVL292I= X-Received: by 2002:a05:6a20:d499:b0:1d9:c615:d1e6 with SMTP id adf61e73a8af0-1e5dfb65989mr12386101637.0.1734825926143; Sat, 21 Dec 2024 16:05:26 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842dc605001sm4846545a12.54.2024.12.21.16.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id A3BDCC0BC2; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 34/39] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c Date: Sun, 22 Dec 2024 08:04:57 +0800 Message-ID: <20241222000509.2205895-35-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Clang issues the following warning: tst-vfprintf-width-i18n.c:51:34: error: invalid conversion specifier '1' [-Werror,-Wformat-invalid-specifier] TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16); ~~^ Since it does not how to handle %I. Reviewed-by: Sam James --- stdio-common/tst-vfprintf-width-i18n.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stdio-common/tst-vfprintf-width-i18n.c b/stdio-common/tst-vfprintf-width-i18n.c index 1be6dd7782..93f8abab56 100644 --- a/stdio-common/tst-vfprintf-width-i18n.c +++ b/stdio-common/tst-vfprintf-width-i18n.c @@ -23,6 +23,7 @@ #include #include #include +#include static int do_test (void) @@ -48,6 +49,9 @@ do_test (void) TEST_COMPARE_STRING (buf, " INR12,345.67"); /* Translated. */ + /* clang does not know about the GNU extension 'I'. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier"); TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16); TEST_COMPARE_STRING (buf, " १२३४५"); TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 26); @@ -58,6 +62,7 @@ do_test (void) TEST_COMPARE_STRING (buf, " १२,३४५"); TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 26); TEST_COMPARE_STRING (buf, " १२,३४५.६७"); + DIAG_POP_NEEDS_COMMENT_CLANG; xsetlocale (LC_ALL, "ps_AF.UTF-8"); @@ -78,6 +83,8 @@ do_test (void) TEST_COMPARE_STRING (buf, " 12٬346 AFN"); /* Counts bytes. */ /* Translated. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier"); TEST_COMPARE (sprintf (buf, "%I11d", 12345), 11); TEST_COMPARE_STRING (buf, " ١٢٣۴٥"); TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 20); @@ -88,6 +95,7 @@ do_test (void) TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥"); TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 21); TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥٫٦٧"); + DIAG_POP_NEEDS_COMMENT_CLANG; return 0; }