Commit 1dc9180fb6acf5f9e015fdbf5fb924159f3d80df

Sam Lantinga 2021-01-27T21:30:25

Fixed compiler warnings

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/hidapi/windows/hid.c b/src/hidapi/windows/hid.c
index 4fa7065..f508ee1 100644
--- a/src/hidapi/windows/hid.c
+++ b/src/hidapi/windows/hid.c
@@ -197,7 +197,7 @@ IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServiceP
 			VER_MINORVERSION, VER_GREATER_EQUAL ),
 		VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL );
 
-	SDL_zero( osvi );
+	memset(&osvi, 0, sizeof(osvi));
 	osvi.dwOSVersionInfoSize = sizeof( osvi );
 	osvi.dwMajorVersion = wMajorVersion;
 	osvi.dwMinorVersion = wMinorVersion;
@@ -751,7 +751,6 @@ static int hid_write_timeout(hid_device *dev, const unsigned char *data, size_t 
 {
 	DWORD bytes_written;
 	BOOL res;
-	size_t stashed_length = length;
 	unsigned char *buf;
 
 	if (dev->use_hid_write_output_report) {