From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AJaANAw7; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id C9A0A5A061A for ; Thu, 07 Nov 2024 15:55:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730991322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RjvXHlKZnuDTf8MF2gdx40+YcA4VI5cXfJ3bg9Oxh2c=; b=AJaANAw7MK3kdIRwAlNQN6vUPaz4gizePzLTlNGMKES44UpvUFAFcrR2TVAOqotiaOTJeF IcMsHeFfIItd0tlABghm+OSSSQ6wy2jNC6ykjQyaqLc6+0VCzs2ITNu+huOrubUN7Dz7xb LmOUIBcJt+wHiWCbZIeOdTaXjtt+9Io= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-60-kL3yE6MKP-eFJZ8lP-vJaA-1; Thu, 07 Nov 2024 09:55:21 -0500 X-MC-Unique: kL3yE6MKP-eFJZ8lP-vJaA-1 X-Mimecast-MFC-AGG-ID: kL3yE6MKP-eFJZ8lP-vJaA Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539ec1a590fso756503e87.0 for ; Thu, 07 Nov 2024 06:55:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730991319; x=1731596119; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RjvXHlKZnuDTf8MF2gdx40+YcA4VI5cXfJ3bg9Oxh2c=; b=Vq/5fBUnRt0wH+Axd7jKqmS1UR6RVepONgLIohg+nNB3VqaBR5K/UKwDVBwNajunAq CgxI7I9P8TmGONB4PBkhgczodBc7NamrlR4DLBmbZ7HRU6Bx/E2DWt9lgoHMrZy9HO0H UbAaOg7p9RFJPvJinMVhEXtCe8M1YDtXE7uR/7iZb1omTYAbysobBGBMFYfTwtpfOjPW UHUzeyveAm1BlpvUxsC0TOtyZ3WEkvDSbeaOsgKt+rSQGh6mgR2upcx6J3hC0It/nEoy kS0wk0tmDwYfbocY/l8cw8+TZj0MQbkTeZHTWXJkCvK15YQkAQG69bHNPgucQ4Fo0MXb o98A== X-Gm-Message-State: AOJu0Yw+NyoRD7I++gN8YlPuDrBSTBPuzgwTWkAnhKZDbldx1lhFTuNp lssH9ELBCFe5uAIeCrzMwXTyDuS3M7c/sTY/nNb46rGbqubt/HKp5bhXNyeBz3RTIfZJnD2+bWv F+RozUIzv9/l+mUU+xWbvHZ6+Fut1su3ya/fRkhuOCGsp6xk00pABpuBVnQ== X-Received: by 2002:a05:6512:2c85:b0:53c:7377:3338 with SMTP id 2adb3069b0e04-53c73773415mr15301899e87.36.1730991319511; Thu, 07 Nov 2024 06:55:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaUhf+nUOgOCuPP2ZBUDPtQT3n0pER+LyHiGP8PRvGsOnS/Vv3Pv6im4D6H0iyeNPoztRQwA== X-Received: by 2002:a05:6512:2c85:b0:53c:7377:3338 with SMTP id 2adb3069b0e04-53c73773415mr15301880e87.36.1730991319027; Thu, 07 Nov 2024 06:55:19 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381eda04111sm1925157f8f.92.2024.11.07.06.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 06:55:18 -0800 (PST) Date: Thu, 7 Nov 2024 15:55:16 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/8] Avoid running cppcheck on system headers Message-ID: <20241107155516.37ce6d1f@elisabeth> In-Reply-To: <20241106065421.2568179-1-david@gibson.dropbear.id.au> References: <20241106065421.2568179-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WlABJxPZJ-KXHoEAX32g-SLkoZHLBP-eM4uS0z3jdhs_1730991320 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: R6GEB25KZZMRTC6BUO2HQGAXYOJDSFP7 X-Message-ID-Hash: R6GEB25KZZMRTC6BUO2HQGAXYOJDSFP7 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 6 Nov 2024 17:54:13 +1100 David Gibson wrote: > It turns out cppcheck has inbuilt knowledge of the C library, and > isn't typically given the system headers. Avoiding doing so reduces > the runtime to less than half of what it currently is. > > For non-obvious reasons, this change also exposes some new warnings. > Some are real, one is a cppcheck bug. Fix and/or workaround these > then make the change to the cppcheck options. > > This is based on my earlier series with clangd configuration and > fixes. > > David Gibson (8): > linux_dep: Generalise tcp_info.h to handling Linux extension > compatibility > log: Only check for FALLOC_FL_COLLAPSE_RANGE availability at runtime > linux_dep: Move close_range() conditional handling to linux_dep.h > linux_dep: Fix CLOSE_RANGE_UNSHARE availability handling > ndp: Use const pointer for ndp_ns packet > udp: Don't dereference uflow before NULL check in > udp_reply_sock_handler() > util: Work around cppcheck bug 6936 > cppcheck: Don't check the system headers Applied, except for 2/8, 3/8, 4/8, and 8/8. I had to skip 8/8 as well for the moment because, contrary to what I reported earlier by mistake, it's actually the one leading to the new cppcheck warning: dhcpv6.c:334:14: style: The comparison 'ia_type == 3' is always true. [knownConditionTrueFalse] if (ia_type == OPT_IA_NA) { ...also on x86. The difference is not the architecture, rather the cppcheck version: it happens with 2.16.x but not with 2.14.x. I'm posting a patch for that soon. -- Stefano