From: Adhemerval Zanella Date: Mon, 20 Oct 2025 12:27:54 +0000 (-0300) Subject: sunrpc: Fix clang build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87e850fb2683b3b1a8bceccc575a31d389f5ecd0;p=thirdparty%2Fglibc.git sunrpc: Fix clang build clang-21 issues: rtime.c:96:36: error: variable 'thetime' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 96 | res = __sendto (s, (char *) &thetime, sizeof (thetime), 0, | ^~~~~~~ For SOCK_DGRAM the sendto sends an uninitialized value. Reviewed-by: Collin Funk --- diff --git a/sunrpc/rtime.c b/sunrpc/rtime.c index e3cffe26d4..3cddb848c4 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;