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().
This commit is contained in:
parent
485d3e4c3c
commit
43b3a93625
22
asyncsocket.c.patch
Normal file
22
asyncsocket.c.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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 &&
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
Name: open-vm-tools
|
Name: open-vm-tools
|
||||||
Version: %{toolsversion}
|
Version: %{toolsversion}
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Open Virtual Machine Tools for virtual machines hosted on VMware
|
Summary: Open Virtual Machine Tools for virtual machines hosted on VMware
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://github.com/vmware/%{name}
|
URL: https://github.com/vmware/%{name}
|
||||||
@ -52,7 +52,7 @@ ExclusiveArch: %{ix86} x86_64 aarch64
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Patches
|
# Patches
|
||||||
#Patch1: <patch-name1>.patch
|
Patch1: asyncsocket.c.patch
|
||||||
#Patch2: <patch-name2>.patch
|
#Patch2: <patch-name2>.patch
|
||||||
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
|
Loading…
Reference in New Issue
Block a user