[HHPCOMP] Fix 2 MSVC C4101 warnings (#2392)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Sat, 6 Jun 2020 16:42:47 +0000 (18:42 +0200)
committerGitHub <noreply@github.com>
Sat, 6 Jun 2020 16:42:47 +0000 (18:42 +0200)
"...\chmc\chmc.c(671): warning C4101: 'code': unreferenced local variable"
"...\chmc\chmc.c(671): warning C4101: 'len': unreferenced local variable"

sdk/tools/hhpcomp/CMakeLists.txt
sdk/tools/hhpcomp/chmc/chmc.c

index 50fd03c..a3f7e9d 100644 (file)
@@ -16,9 +16,6 @@ add_executable(hhpcomp ${SOURCE})
 target_link_libraries(hhpcomp)
 
 if(MSVC)
-    # Disable warning "'x': unreferenced local variable"
-    target_compile_options(hhpcomp PRIVATE "/wd4101")
-
     # Disable warning "'=': conversion from 'a' to 'b', possible loss of data"
     target_compile_options(hhpcomp PRIVATE "/wd4244")
 endif()
index f96ff11..9c0e021 100644 (file)
@@ -668,7 +668,9 @@ int chmc_system_done(struct chmcFile *chm)
        sysp = malloc(16384);
        if (sysp) {
                UInt32 val;
+#ifndef __REACTOS__
                UInt16 code, len;
+#endif
                const char *entry_val;
 
                p = chmc_syscat_mem(sysp, &system->version, sizeof(system->version));