diff mbox series

[U-Boot,v3,08/13] fdtdec: test: Fix build warning

Message ID 20190321181010.27005-9-thierry.reding@gmail.com
State Accepted
Delegated to: Simon Glass
Headers show
Series ARM: tegra: Add support for framebuffer carveouts | expand

Commit Message

Thierry Reding March 21, 2019, 6:10 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

Hide the declaration of the "fd" variable When not building a DEBUG
configuration, to avoid the variable being unused.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- new patch

 lib/fdtdec_test.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass March 22, 2019, 7:53 a.m. UTC | #1
On Fri, 22 Mar 2019 at 02:10, Thierry Reding <thierry.reding@gmail.com> wrote:
>
> From: Thierry Reding <treding@nvidia.com>
>
> Hide the declaration of the "fd" variable When not building a DEBUG
> configuration, to avoid the variable being unused.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - new patch
>
>  lib/fdtdec_test.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass April 12, 2019, 9:49 p.m. UTC | #2
On Fri, 22 Mar 2019 at 02:10, Thierry Reding <thierry.reding@gmail.com> wrote:
>
> From: Thierry Reding <treding@nvidia.com>
>
> Hide the declaration of the "fd" variable When not building a DEBUG
> configuration, to avoid the variable being unused.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - new patch
>
>  lib/fdtdec_test.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index a82e27de942f..065fed278cf3 100644
--- a/lib/fdtdec_test.c
+++ b/lib/fdtdec_test.c
@@ -79,7 +79,9 @@  static int make_fdt(void *fdt, int size, const char *aliases,
 {
 	char name[20], value[20];
 	const char *s;
+#if defined(DEBUG) && defined(CONFIG_SANDBOX)
 	int fd;
+#endif
 
 	CHECK(fdt_create(fdt, size));
 	CHECK(fdt_finish_reservemap(fdt));