From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 9369A5A0262 for ; Tue, 21 Mar 2023 16:42:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679413351; 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=eVWivpHqb/FYS9KxLvh2q7Wnz/JyBkOTQa9JBpSGqf0=; b=Egt00dF3uD1O00qOgRXQKL4MYTuccb4vk0xZiveuXseUBLBqIdbGorf3/1H8VUoGccZB4X YOZQFRKByJtQZtvPOPvBpCBvRLUaTShZ020jfIm2ntvMQNRY0XGlWYYYLCpTSlrZswHDS7 JGZldRYnA8jT/IFVgrVqQtURR6QUy5o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-351-8IiEQvn4PM6PLLJ0ktONGw-1; Tue, 21 Mar 2023 11:42:29 -0400 X-MC-Unique: 8IiEQvn4PM6PLLJ0ktONGw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3DFF2884341; Tue, 21 Mar 2023 15:42:28 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12F9640C6E6A; Tue, 21 Mar 2023 15:42:27 +0000 (UTC) Date: Tue, 21 Mar 2023 16:42:16 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 1/2] Work around weird false positives with cppcheck-2.9.1 Message-ID: <20230321164216.28d4d82e@elisabeth> In-Reply-To: <20230321035500.732872-2-david@gibson.dropbear.id.au> References: <20230321035500.732872-1-david@gibson.dropbear.id.au> <20230321035500.732872-2-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: NJ536CB72XLALGSU4WCUXJISJCVZWIXT X-Message-ID-Hash: NJ536CB72XLALGSU4WCUXJISJCVZWIXT 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 Tue, 21 Mar 2023 14:54:59 +1100 David Gibson wrote: > Commit 89e38f55 "treewide: Fix header includes to build with musl" added > extra #includes to work with musl. Unfortunately with the cppcheck version > I'm using (cppcheck-2.9-1.fc37.x86_64 in Fedora 37) this causes weird false > positives: specifically cppcheck seems to hit a #error in > complaining about including it directly instead of via (which is > not something we're doing). > > I have no idea why that would be happening; but I'm guessing it has to be > a bug in the cpp implementation in that cppcheck version. In any case, > it's possible to work around this by moving the include of > before the include of . So, do that. Checked on Alpine, build against musl still works with this. Applied, I'll push it out in a bit. -- Stefano