| Message ID | 20251120025614.2215587-3-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607398; bh=/poh6TpL5vErnArOCZh+ujbZuXq+uWNFgZv/rdqdkoY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mw5njZ8O9kXnmCd1FvOzr5gpvFmxh8Q9MgB/FHa9vMLx9l4z1eGl/Kq3x+0F81K+W rMZauLCKdKh7vkgh7d9dQFRnaqkJyZnWZRNMmxS/VrSpNEX8danlpZaKRyNTHNiSiK XQ4BH+0Ik3U18F8FHneAdVeFiozKJfj6GLFsF83zD/o3+TB19tBUCe8BeV3e9H02Vj 76sRO0mKoroywhs1OtghtZawlpD4BTA/91U2/ztfrQE48JNVBnyHQFtZG43BZpTyUe neEf8gmcJR2Ryusfmc7juB42Kv/i2uuMCdR4pMswmILMZlAbbZdQGYmgfTQswhqylU 6kxtm0u/wpyzA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 11F8F68631 for <u-boot-concept@u-boot.org>; Wed, 19 Nov 2025 19:56:38 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jNUUS7oqPyGQ for <u-boot-concept@u-boot.org>; Wed, 19 Nov 2025 19:56:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607396; bh=/poh6TpL5vErnArOCZh+ujbZuXq+uWNFgZv/rdqdkoY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=R+LVdRvnpBLxxHA35ej18gPjv4d2eMm2c3jdpa+1ux+l24Z79GSOFliWP+T11njM4 YVpvrJAN6/oywP4YP2DaPJT1sv9Ts5OZ1ak56iN4TFQnSYXci2UJ4kZGi0Z4BvXsDI pAcuqfEj8yrnoPToVvD1IQ0O1ydo1jqM17NrqMI1sEOo1fwkpEXPX0Sx4Ol7uyBWap xkG9PkXUZwYsusrsZeIq+nHASpQi230qVqGTosWv1JWzE9ro66O64VK8iTp1Vh8OoQ 7Fqx4/4vDtZ4uQLOHuiJBPu472oXqt1JPFTy7wZwVjD8/RAVknj3VqM2TIpfoT3Ll8 JhNbF/SLpL/Pg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9E34D686DC for <u-boot-concept@u-boot.org>; Wed, 19 Nov 2025 19:56:36 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607394; bh=F4s7NPnnFRXihHiqbgZl9oq1IoMGdgSnVAxFecerUzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sZO4gPOMSDQpvdJWlzSVdOVmKO0E1vAjk2fURwA5cPsaJhDO6Ks9nIHg9XXaopSma nJiwPtSnchRAHWLqecrRSLOTXGQcF+3210lcC7venahJEOQf+k2/GkBRICX+zGeoXM YwAtR8zqguQfzrie6ts4FBzMVdovaze13wovXAXp28Vw31Ry6KKFMn7RTf9GCODtbM yAyYuA7Newt83wOkc1q/A4i3X1EnRy6tBIykVv/lS0ryrg/EKVz9NUv52X4hAcPIpa Yq67ArNUkWlF2prTMn4mzShozErgKjkZizKfmbi5e0FRwOzVJpun+4Qd/lF4CFAu4N X0FrQLdGNOcoQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 28D1E68631; Wed, 19 Nov 2025 19:56:34 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id p-5qUvVSk5Uj; Wed, 19 Nov 2025 19:56:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607393; bh=eWc4WL6sBpp2hy86TGPKReu9ipi5OTsfggsF384x1t0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bFklFyZIeANsA82pkb/Q/NylQgilqhzoxq1Yl9vRSUMgF8lQuo7Jy0RbaITzHgy5H RPSn9W4CoZ1nA9yFqBf/0yKXDGeaGwl4mRJ6gt1XfzhiaCWzzDb7YMyHBKl7IJzPy+ /p9GEr/XcT2ruHDejvD7DdU9hSiPd0ZoVr9s1lMj3lep49fshVmaMjvBVZ+fUxdCI9 VJFotns+LBDAX41+bZ5U1uhsjLebRG27vMRtj3Vmy6jlQKx4KARMdRihkohBjqyF/2 2CETbAN5fSLnhgwsN9jKGWm77h6fi5S9cMMquRrxTAE1BIUYsAMWs3bapgvSw2+OIg leb2U+Kwg6neg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 82BE85E7DA; Wed, 19 Nov 2025 19:56:33 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 19 Nov 2025 19:55:37 -0700 Message-ID: <20251120025614.2215587-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251120025614.2215587-1-sjg@u-boot.org> References: <20251120025614.2215587-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2VUCJLLR6PS6F5NMXG3HSBIB42DOEO2A X-Message-ID-Hash: 2VUCJLLR6PS6F5NMXG3HSBIB42DOEO2A X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com>, Claude <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/30] tools: Fix debug() to avoid unused-variable warnings List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/2VUCJLLR6PS6F5NMXG3HSBIB42DOEO2A/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
fit: Improve and test the code to print FIT info
|
|
Commit Message
Simon Glass
Nov. 20, 2025, 2:55 a.m. UTC
From: Simon Glass <simon.glass@canonical.com> The debug() macro in mkimage.h expands to nothing when MKIMAGE_DEBUG is not defined. This causes the compiler to warn about unused variables that are only referenced in debug() statements. Fix this using the same approach as the debug_cond() macro. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- tools/mkimage.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/mkimage.h b/tools/mkimage.h index 5d6bcc9301a..a356d20c3b1 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -25,9 +25,13 @@ #undef MKIMAGE_DEBUG #ifdef MKIMAGE_DEBUG -#define debug(fmt,args...) printf (fmt ,##args) +#define debug(fmt, args...) printf(fmt, ##args) #else -#define debug(fmt,args...) +#define debug(fmt, args...) \ + do { \ + if (0) \ + printf(fmt, ##args); \ + } while (0) #endif /* MKIMAGE_DEBUG */ #define log_debug(fmt, args...) debug(fmt, ##args)