open-vm-tools/asyncsocket.c.patch
John Wolfe 43b3a93625 Address (fix) strings or array bounds warnings from GCC 12.0.x.
- lib/asyncsocket/asyncsocket.c: Use size_t variables to index arrays in
   function AsyncTCPSocketPollWork().
2022-02-01 23:27:13 -05:00

23 lines
896 B
Diff

diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c
index 05147d2..05cb066 100644
--- a/lib/asyncsocket/asyncsocket.c
+++ b/lib/asyncsocket/asyncsocket.c
@@ -2810,7 +2810,7 @@ AsyncTCPSocketPeek(AsyncSocket *base, // IN:
static int
AsyncTCPSocketPollWork(AsyncTCPSocket **asock, // IN:
- int numSock, // IN:
+ size_t numSock, // IN:
void *p, // IN:
Bool read, // IN:
int timeoutMS, // IN:
@@ -2830,7 +2830,7 @@ AsyncTCPSocketPollWork(AsyncTCPSocket **asock, // IN:
struct fd_set rwfds;
struct fd_set exceptfds;
#endif
- int i;
+ size_t i;
int retval;
ASSERT(outAsock != NULL && *outAsock == NULL && asock != NULL &&