summaryrefslogtreecommitdiff
path: root/lib/fdtdec_test.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-03-21 19:10:05 +0100
committerSimon Glass <sjg@chromium.org>2019-04-11 20:10:50 -0600
commit3db600c3ea709e97b4cc907129137dcde04b9ce5 (patch)
tree332101006b5bca7476193d785cf5310fd6a2c27d /lib/fdtdec_test.c
parent54969b40a0a8c5c4adbb230f8c2dd61dd9147889 (diff)
fdtdec: test: Fix build warning
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> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/fdtdec_test.c')
-rw-r--r--lib/fdtdec_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index a82e27de94..065fed278c 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));