about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-21 12:32:23 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-12-21 12:33:22 +0100
commit945b4192b1cd06eed2d4019412ce45c88a4cbd03 (patch)
tree9161e9c64be1e145e439558b540c07f51744b4ce /src
parent3b71ba6090f3b69a3e8927e04b60889ffab47368 (diff)
downloadbox64-945b4192b1cd06eed2d4019412ce45c88a4cbd03.tar.gz
box64-945b4192b1cd06eed2d4019412ce45c88a4cbd03.zip
[WRAPPER] Fixed a few uninitized value used warning from Vamgrind
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/wrappedlibc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index f307a0b9..a34d8faf 100644
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -1681,8 +1681,8 @@ static int isProcSelf(const char *path, const char* w)
 
 static int isSysCpuCache(const char *path, const char* w, int* _cpu, int* _index)
 {
-    char tmp[128];
-    int cpu, index;
+    char tmp[128] = {0};
+    int cpu=0, index=0;
     if(sscanf(path, "/sys/devices/system/cpu/cpu%d/cache/index%d/%s", &cpu, &index, tmp)!=3)
         return 0;
     if(strcmp(tmp, w))
@@ -2092,7 +2092,7 @@ EXPORT FILE* my_fopen64(x64emu_t* emu, const char* path, const char* mode)
         lseek(tmp, 0, SEEK_SET);
         return fdopen(tmp, mode);
     }
-    int cpu, index;
+    int cpu=0, index=0;
     if(isSysCpuCache(path, "ways_of_associativity", &cpu, &index) && !FileExist(path, IS_FILE)) {
         // Create a dummy one
         int tmp = shm_open(TMP_CPUCACHE_ASSOC, O_RDWR | O_CREAT, S_IRWXU);