From: Thierry Reding Date: Thu, 21 Mar 2019 18:10:05 +0000 (+0100) Subject: fdtdec: test: Fix build warning X-Git-Tag: v2019.07-rc1~25^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db600c3ea709e97b4cc907129137dcde04b9ce5;p=pandora-u-boot.git 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 Reviewed-by: Simon Glass --- diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c index a82e27de942..065fed278cf 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));