From bb6877ed783f757a6a5573ddd0594e6f305a9fcc Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 22 Jan 2018 08:32:40 -0600 Subject: [PATCH] apps/nshlib: Fix compile error when CONFIG_NSH_DISABLESCRIPT is not defined. The field np_flags does not exist if scripting is disabled. --- nshlib/nsh_parse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nshlib/nsh_parse.c b/nshlib/nsh_parse.c index f30303e40..0dd2a630a 100644 --- a/nshlib/nsh_parse.c +++ b/nshlib/nsh_parse.c @@ -1,7 +1,8 @@ /**************************************************************************** * apps/nshlib/nsh_parse.c * - * Copyright (C) 2007-2013, 2014, 2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2013, 2014, 2017-2018 Gregory Nutt. All rights + * reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -1169,7 +1170,9 @@ static FAR char *nsh_argexpand(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline, envstr = nsh_envexpand(vtbl, ptr); +#ifndef CONFIG_NSH_DISABLESCRIPT if ((vtbl->np.np_flags & NSH_PFLAG_SILENT) == 0) +#endif { nsh_output(vtbl," %s=%s\n", ptr, envstr ? envstr :"(null)"); }