From patchwork Sun Dec 22 00:04:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852897 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2773640wrq; Sat, 21 Dec 2024 16:31:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdIjKaeclLr6i3TT6PJsdEplFI2bOSuKbY03GlZi/taKyJIPY6QyeDL1bkV72ukaKFEOg/JQ==@linaro.org X-Google-Smtp-Source: AGHT+IEA6p6cnc9V1s/4cHfXsXZ+7skDBhOuf8rOAN44rEEPdKj3GKBTkfLO0Cn95XVI/4g46yJB X-Received: by 2002:a05:6214:4199:b0:6d8:8aa6:ef27 with SMTP id 6a1803df08f44-6dd233978bfmr157829486d6.38.1734827486973; Sat, 21 Dec 2024 16:31:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827486; cv=pass; d=google.com; s=arc-20240605; b=B98DR2qj8OGUDt+zeCgNIUbqroPJY0D12KHS998VPesaExObROR7fO6WOU/xMjJfQZ RHI/ja1Oee6UJvFOjsgpBlU9HnE/kP3h6pTB5Ua9PaxG2lbRChyRlcPjXOnTFNHNX7J7 3uzZOQsvc2iGJOud5I9WDb5i9tf28J36UqKNIRVWZ8iL+2mJAHPo2KBfCBcXoVhUBKDS Kg8mxADu7DVFzF8mzIR5ShTwu3e94lWV1YOxmf6gqJw7z/QJgVV3Ms8wRnhU81sBTxoh i/LvyJ1JJeakEnxRREGYypIcGk0p/fwo75zErHwpj61MSSc+UH4f5TpwNsKxv77/6PXS LnLg== 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=Hg8Xoew/H1cpg0+4/B8CQEDXI+xaWCzVgJs3xLUm+3Q=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=QNuJHwG27hw+unioJOZ1NBrPtPRH4HhSYNWK3Maje9qW1KTOxkYyUJxQwRegJ2BPj9 4W7hvLKrjFTNOavFeYgRFmNY4yxIsNvL8ZXiFXN5curG1Pz9RdFb5y4eDVS9JxRoEelI z/G0bM/MmLKCwFcVVaQ02T8akhHCu5meCmiok1RuzRS78rap/h3B5co63IOs+Q4Hr0xn xA9lWBteSxMZ92C5HhUsoyIDKIBBFbxEHkovTtav/s8NSKJU1ROXi+EGL91rBpChIUfO GzmACb/xwpgh/4n0DTGfy5dXQGpIP7M0qrZaNRhRrWP3NNWsqM4xmhqS9THXMZjoh30T prgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SUGiALcV; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd1813737esi83281266d6.151.2024.12.21.16.31.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:31:26 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SUGiALcV; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 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 662573858D3C for ; Sun, 22 Dec 2024 00:31:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 662573858D3C 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=SUGiALcV X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id B5526385828E for ; Sun, 22 Dec 2024 00:05:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5526385828E 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 B5526385828E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825940; cv=none; b=S5GzRVk1u5hkz4ww5QV+octnYy/poYoPZ5E3umxt+sTDd2bSsTRtF4PNZT6F69GatsA2TiOXhF2hzDi9fniCVMvo7McJDN3bUMARCevIETbF7jw7VzxicVSB4OXoQVSW0NLjKFHJI12zW8o12u54HVJ9PwcFD2Fw/HKZsMNdxus= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825940; c=relaxed/simple; bh=qNo/QzloqW523ao0DpEsVCb6SrQYOU4s93IwSkolwYc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Rq1LHJovGgw2qwf5ZUbWEzE/2UIOsvo1P9S9HlHquLgGcCMQ2i3JnP2ryffClSddZMvSeY+/7raJ09+XgZXp61wyx6R6RpiJDJ9OAScTwV3LUwPT/TWflVN+vwg1SA1Aw6lKxVb7/kG5TW86MnosUyHVD0+5IE0BvM6FLGUULy8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7fbd9be84bdso3108386a12.1 for ; Sat, 21 Dec 2024 16:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825928; x=1735430728; 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=Hg8Xoew/H1cpg0+4/B8CQEDXI+xaWCzVgJs3xLUm+3Q=; b=SUGiALcV3Nw0bTkKphVbJmV3GIWU6bXqsu1CEmGMsNJxOR/6F2XVk4EFI8Rs1HP9Ya 20KeKxtq2SuvkcmnasnV4FgfYyA8ksJ7UvOl1egVzuYEPdi+xA5cc3xUvbsakMVPQE5h KWmLJnxbwwhBVAX6YZ+PnS+F4J1ZLIBVdHEFX1FtFg+BPDmHt9KA5DeMJnnikQiqeP2X vYgyLa2VSKOWZHNAvQsnkwDm8K0JZmXnyqSOU8/s+AwGbEjuPi3EnQKgu80o83mKBnyj z64oTQlkL2dsvGbXotRpKzofitlBIj6gxAm/obtbjhqrltGEzxutGUWtxWQecNFo2TSN h+rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825928; x=1735430728; 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=Hg8Xoew/H1cpg0+4/B8CQEDXI+xaWCzVgJs3xLUm+3Q=; b=iu3bJHs45dh5n+Mqmg3kAocTxj8knE0Qkx1NXZksU8Q8s5fpW50szPUq2vgLmkkR7w ZvLuCSVI5F/rAwaB8HLzYJjpSugjGp0mxgDNb1fwZNb4avBWpo3L4Kj84lOU/PH1fO2O 684esECNuAOFwYAmsq+257uBA5SHWzyUdXOs0c63ILoiC/E0X3j5bWKaCbqOycCiXPx0 vSpmA/QriDb442dSKeeBqh7GnC9EOUi6ktqM471sp/KoZBol+/JQVqw5gToJoS1qyr+A XJ5aZQ/8sMwww5PEvqLxKBKIahkO++4nPUtRKoVICQ0awFuJ7Z/Ct8naHOYJGY5welX4 8qYg== X-Gm-Message-State: AOJu0YzzKu7hhrBg/g5DEy+H/xQWp6EvBIgbCEWDVSMp3ee+3ot/GAZN gx3SS3REkxIzo3AXEauo9Fr1gH9lwgHpf/k5koLUMoa0MzpkcXW6 X-Gm-Gg: ASbGncuxw8wmfE70euGTtAM8i6bB/N7+QGaGwOrl74g+BXE8y+XDUxbp9umOjFZ2apx 3MruY7FrSyVipy1mgcveU/I1PvG3CvmVAmLULbFoyW48yUMAc0N0cahpQdtASktpJnOAMh0xLA+ egXkOEnCdKSSQBIbd1ki0xwjpFStUE/xYpdTd7zwruEnlDo4wsU8+cQyCL0phUrvnInuSCmE2oh nDK/s/6gLDy3jsQdIKo9/sGZlS5RJnl+zE39Qh2ggvPEN/Agfb6oebQo111jH1h81FdXlI= X-Received: by 2002:a17:90b:50c3:b0:2ea:77d9:6345 with SMTP id 98e67ed59e1d1-2f452e4cfb2mr10371981a91.22.1734825927777; Sat, 21 Dec 2024 16:05:27 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc962cddsm49217055ad.48.2024.12.21.16.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:26 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 8E862C0BA5; 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 32/39] stdio: Fix clang warnings on tests Date: Sun, 22 Dec 2024 08:04:55 +0800 Message-ID: <20241222000509.2205895-33-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 does not support 'I' specifier and handles it as a 'length modifier'. Reviewed-by: Sam James --- stdio-common/tst-scanf-to_inpunct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdio-common/tst-scanf-to_inpunct.c b/stdio-common/tst-scanf-to_inpunct.c index 6fc038f476..fab1a232b9 100644 --- a/stdio-common/tst-scanf-to_inpunct.c +++ b/stdio-common/tst-scanf-to_inpunct.c @@ -18,6 +18,7 @@ . */ #include +#include #include #include #include @@ -68,7 +69,11 @@ do_test (void) for (int i = 0; i < array_length (inputs); i++) { int n; + /* clang does not support 'I' specifier. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat"); sscanf (inputs[i].str, "%Id", &n); + DIAG_POP_NEEDS_COMMENT_CLANG; TEST_COMPARE (n, inputs[i].n); }