From patchwork Fri Jun 7 02:45:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam X-Patchwork-Id: 1944810 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KLMzarA5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=mVpW8Nlo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VwQbq5Th9z20KL for ; Fri, 7 Jun 2024 12:47:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BxJ6zCUHBFJyNKMWslwliJ2BrA4Hm2qZbDHpO2yGMs0=; b=KLMzarA5tickWL AMWijR23DzhqLWkJJcXxCI3j8u/jU08YYHRmvVAdfuuGWT4NMk5i5+1vyv+yt0SkBr6ZgqvZpRDSs j9iIamOveW35ZR1XHqOD5NG+SbXA7lJn9670vmTDs6S/IRiZ2CAsTgP2dc9jQd70E1mXv8X1O/toT IftxK2QtT4Mu98W+uT/SAgNOR7+cNkremfuB185yBAaZPFc4pXHvnHl6pw3R3z1gqO2UH8SUaQSpG Z0q92RzQmMsQKJnB5dcVgS6hBlJ2waS7JgB15UAZyagrx0xmLq5IMEZz2Yho/9QUhcQg2AuVZXDGU MRKeWp1Tee2wX1+0rmwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFPc3-0000000C6PX-0RwU; Fri, 07 Jun 2024 02:45:55 +0000 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFPc0-0000000C6P5-4C5r for openwrt-devel@lists.openwrt.org; Fri, 07 Jun 2024 02:45:54 +0000 Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-dfa7797e897so1928994276.2 for ; Thu, 06 Jun 2024 19:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717728349; x=1718333149; darn=lists.openwrt.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=SWAIVNxsw+UiF8xr3xHGr+zRA7ElshkV9JDr1nYY1mE=; b=mVpW8NlohjK7pA4BGfkeyl0EhE0sLTDiorfh9O23AWJMfZNSNBaMpSFvxr6mT6Z/qu rJNK59DFFFYz2Le30/+A0kD1kvEDE/BpivilVHAm1RanN2dh97rFBa6r9FKkYEQ8Tye+ gm0vF1Wu0wFWLamyK98kYeT9o6TVESwuXkuxu1spTlf7HgRO64353mrFSctkvTBcLJYj N0yYZ2IpAZlNpHcjlfzU37ttRo0aSDQFN/Sxi2imcPqeJEpWDoY1we459b+kTaZIlsII rqeBrPx+VLhJPv/NqNPp2viJVBXk/vanycV10RQ79fOLmIpKv1XV4AoSRwXZJf4UE1As 9Cnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717728349; x=1718333149; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SWAIVNxsw+UiF8xr3xHGr+zRA7ElshkV9JDr1nYY1mE=; b=W6zr43WrsRW3ypXoxOo4MTlusZYv4hwS4aqai2yY8lmYTfzgd6qdRc9+Hcsiqcv0Tw WYRroZrzwqbhY1acf0vBimmk1FMkuyBk4YnkY+A20OJ7XymRI1nEjRIH7jNz9E8+8N6t HgeW6tEej+opZzz8kwWnKXsJ2UUbhqk4gqBeaaBk2JsFiaYxVZhWUvTSuAujL+dQf/vH HoE9gEB+oiNlLRiGYdfwck2bKs5eeVH8wMZlqGqZXp9oN4ckvWmK3HNLeDV4eSKkxkia DWxf8ll2MMq68Vdr2IYfemFVp1a3IqOUfLS1s2/Dw3imLBMTtYJckqosv+kNX1sxLFSA J9MA== X-Gm-Message-State: AOJu0YyIbRfGc8MyxlntWo8/vZso1m6NoDh37hg1Lzi2gK76N9lJlELa 4n3Xh2fod5AGt3gYnRSW8g12fGE/0hhQCEp/gKqi+Bws3Ib+Xk+xdnwFMHWoWgexJpnBy+4vHOO 0zSb1e049kCfNplOcrCKSnB7Sa2k= X-Google-Smtp-Source: AGHT+IFoOMXy7G13ZbNDvNRI9hLoFwgCZkbmZSq7GHULmuET3M90IQv5gpvNoHvFZRmfb+6C+vs4F8+xds1MQLGQ/qc= X-Received: by 2002:a25:c70b:0:b0:de5:5bca:ecb0 with SMTP id 3f1490d57ef6-dfaf62ae1demr1378156276.0.1717728349123; Thu, 06 Jun 2024 19:45:49 -0700 (PDT) MIME-Version: 1.0 From: Adam Date: Fri, 7 Jun 2024 10:45:41 +0800 Message-ID: Subject: [PATCH] mtd: fix compile warnings To: john@phrozen.org Cc: openwrt-devel@lists.openwrt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_194553_066199_B8736E35 X-CRM114-Status: GOOD ( 10.25 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Adam-0320 ubi-mdeia.h defines 'struct ubi_vid_hdr'. It is used as a parameter type of function 'ubigen_init_ec_hdr', which is declared in libubigen.h. ubiformat.c and liubigen.c use this function. And they both [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:b35 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [adam0320a(at)gmail.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Adam-0320 ubi-mdeia.h defines 'struct ubi_vid_hdr'. It is used as a parameter type of function 'ubigen_init_ec_hdr', which is declared in libubigen.h. ubiformat.c and liubigen.c use this function. And they both have included ubi-mdeia.h and libubigen.h. However, mtdinfo.c includes libubigen.h but not ubi-mdeia.h. This also happens to 'ubi_ec_hdr'. These issues lead to warnings: In file included from ubi-utils/mtdinfo.c:34: ./include/libubigen.h:124:32: warning: 'struct ubi_ec_hdr' declared inside parameter list will not be visible outside of this definition or declaration 124 | struct ubi_ec_hdr *hdr, long long ec); | ^~~~~~~~~~ ./include/libubigen.h:140:33: warning: 'struct ubi_vid_hdr' declared inside parameter list will not be visible outside of this definition or declaration 140 | struct ubi_vid_hdr *hdr, int lnum, | ^~~~~~~~~~~ So include ubi-media.h in libubigen.h. Signed-off-by: Adam-0320 --- .../patches/140-mtd-fix-compile-warnings.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 package/utils/mtd-utils/patches/140-mtd-fix-compile-warnings.patch diff --git a/package/utils/mtd-utils/patches/140-mtd-fix-compile-warnings.patch b/package/utils/mtd-utils/patches/140-mtd-fix-compile-warnings.patch new file mode 100644 index 0000000..bb07c55 --- /dev/null +++ b/package/utils/mtd-utils/patches/140-mtd-fix-compile-warnings.patch @@ -0,0 +1,12 @@ +diff --git a/include/libubigen.h b/include/libubigen.h +index 48d2fad..0c20979 100644 +--- a/include/libubigen.h ++++ b/include/libubigen.h +@@ -26,6 +26,7 @@ + #define __LIBUBIGEN_H__ + + #include ++#include "ubi-media.h" + + #ifdef __cplusplus + extern "C" {