[PATCH 57/59] sunrpc: Fix clang build
Collin Funk
collin.funk1@gmail.com
Mon Oct 20 19:39:50 GMT 2025
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> For SOCK_DGRAM the sendto send an uninitialized value.
s/send/sends/
> ---
> sunrpc/rtime.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sunrpc/rtime.c b/sunrpc/rtime.c
> index e3cffe26d48..3cddb848c46 100644
> --- a/sunrpc/rtime.c
> +++ b/sunrpc/rtime.c
> @@ -75,7 +75,7 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep,
> int milliseconds;
> int res;
> /* RFC 868 says the time is transmitted as a 32-bit value. */
> - uint32_t thetime;
> + uint32_t thetime = 0;
> struct sockaddr_in from;
> socklen_t fromlen;
> int type;
The warning and fix are correct.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Collin
More information about the Libc-alpha
mailing list