apps/restconf: fix compiler warning 'addr' may be used uninitialized
Natvie build with GCC 11.3 generates the following warning. The patch is silly and the code path should never be reached, but it silences the compiler. restconf_main_native.c:572:9: warning: ‘addr’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
9cd764f031
commit
726394d97c
1 changed files with 3 additions and 0 deletions
|
|
@ -564,6 +564,9 @@ restconf_accept_client(int fd,
|
|||
addr = &(in6->sin6_addr);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
errno = EAFNOSUPPORT;
|
||||
goto done;
|
||||
}
|
||||
if ((rsock->rs_from_addr = calloc(INET6_ADDRSTRLEN, 1)) == NULL){
|
||||
clicon_err(OE_UNIX, errno, "calloc");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue