From 43b3a93625148b128bac4c71d096178244f0d921 Mon Sep 17 00:00:00 2001 From: John Wolfe Date: Feb 02 2022 04:27:13 +0000 Subject: 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(). --- diff --git a/asyncsocket.c.patch b/asyncsocket.c.patch new file mode 100644 index 0000000..5f277c0 --- /dev/null +++ b/asyncsocket.c.patch @@ -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 && diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 25bc50a..4180be4 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -32,7 +32,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware License: GPLv2 URL: https://github.com/vmware/%{name} @@ -52,7 +52,7 @@ ExclusiveArch: %{ix86} x86_64 aarch64 %endif # Patches -#Patch1: .patch +Patch1: asyncsocket.c.patch #Patch2: .patch BuildRequires: autoconf