fixed the unused variable caused warnning in lib_gethostbyaddrr

lib_gethostbyaddrr.c: warning: label 'out_copyname' defined but not used [-Wunused-label] 204 | out_copyname:

Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
This commit is contained in:
yangshuyong 2023-06-28 11:07:49 +08:00 committed by Xiang Xiao
parent 6c8b0ba9f3
commit 0b8b5da851
2 changed files with 5 additions and 0 deletions

View file

@ -201,7 +201,9 @@ static int lib_localhost(FAR const void *addr, socklen_t len, int type,
return 1;
#if defined(CONFIG_NET_IPv4) || defined(CONFIG_NET_IPv6)
out_copyname:
#endif
/* And copy localhost host name */

View file

@ -228,7 +228,10 @@ static int lib_localhost(FAR const char *name, FAR struct hostent_s *host,
FAR struct hostent_info_s *info;
FAR char *dest;
int namelen;
#if defined(CONFIG_NET_IPv4) || defined(CONFIG_NET_IPv6)
int i = 0;
#endif
if (strcmp(name, g_lo_hostname) == 0)
{