diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-17 10:48:30 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-17 10:48:30 -0600 |
commit | 59dcc17a925acf09087678bc6c1d5077336517a4 (patch) | |
tree | 9557d173d65e703b8ae379314d0912c03306e0f0 | |
parent | 879659afe16d022e26824d6e5b4d3ecd3e8f953b (diff) | |
download | px4-nuttx-59dcc17a925acf09087678bc6c1d5077336517a4.tar.gz px4-nuttx-59dcc17a925acf09087678bc6c1d5077336517a4.tar.bz2 px4-nuttx-59dcc17a925acf09087678bc6c1d5077336517a4.zip |
Eliminate a warning when DHCP is not enabled
-rw-r--r-- | apps/ChangeLog.txt | 4 | ||||
-rw-r--r-- | apps/nshlib/nsh_netcmds.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index e04d124f3..39d781d1b 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -647,3 +647,7 @@ of a single file. Provided by Lorenz Meier (2013-9-13). 6.31 2013-xx-xx Gregory Nutt <gnutt@nuttx.org> + + * apps/nshlib/nsh_netcmds.c: Remove a warning when DHCP is not + enabled (2013-9-17). + diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c index 473045c40..3ff19a090 100644 --- a/apps/nshlib/nsh_netcmds.c +++ b/apps/nshlib/nsh_netcmds.c @@ -572,7 +572,9 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) FAR char *mask = NULL; FAR char *tmp = NULL; FAR char *hw = NULL; +#if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) FAR char *dns = NULL; +#endif bool badarg = false; uint8_t mac[IFHWADDRLEN]; #if defined(CONFIG_NSH_DHCPC) @@ -638,7 +640,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) badarg = true; } } - else if(!strcmp(tmp, "hw")) + else if (!strcmp(tmp, "hw")) { if (argc-1>=i+1) { @@ -651,7 +653,8 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) badarg = true; } } - else if(!strcmp(tmp, "dns")) +#if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) + else if (!strcmp(tmp, "dns")) { if (argc-1 >= i+1) { @@ -663,6 +666,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) badarg = true; } } +#endif } } } |