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>
This commit is contained in:
Thierry Reding 2019-03-21 19:10:05 +01:00 committed by Simon Glass
parent 54969b40a0
commit 3db600c3ea

View File

@ -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));