Commit 4d1c2a1857ce8d674ca8ef61919f4a2f5031ea3b

Sylvain Becker 2020-09-07T19:00:21

Fix false compiler warning: initialize the variable 'memdiff'

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index fbeebd6..f9e9509 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -968,7 +968,7 @@ SDL_SIMDRealloc(void *mem, const size_t len)
     const size_t padded = (padding != alignment) ? (len + padding) : len;
     Uint8 *retval = (Uint8*) mem;
     void *oldmem = mem;
-    size_t memdiff, ptrdiff;
+    size_t memdiff = 0, ptrdiff;
     Uint8 *ptr;
 
     if (mem) {