[Groonga-commit] groonga/groonga at 1530bff [master] Suppress an unused variable warning

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu Oct 30 19:59:08 JST 2014


Kouhei Sutou	2014-10-30 19:59:08 +0900 (Thu, 30 Oct 2014)

  New Revision: 1530bfffe8e3d77ae691c42c5981e91e826ea363
  https://github.com/groonga/groonga/commit/1530bfffe8e3d77ae691c42c5981e91e826ea363

  Message:
    Suppress an unused variable warning

  Modified files:
    src/groonga_benchmark.c

  Modified: src/groonga_benchmark.c (+9 -7)
===================================================================
--- src/groonga_benchmark.c    2014-10-30 19:58:51 +0900 (d9a879e)
+++ src/groonga_benchmark.c    2014-10-30 19:59:08 +0900 (3ce072d)
@@ -1252,7 +1252,6 @@ get_sysinfo(const char *path, char *result, int olen)
   char tmpbuf[256];
 
 #ifdef WIN32
-  int cinfo[4];
   ULARGE_INTEGER dinfo;
   char cpustring[64];
   SYSTEM_INFO sinfo;
@@ -1279,12 +1278,15 @@ get_sysinfo(const char *path, char *result, int olen)
 
   memset(cpustring, 0, 64);
 #ifndef __GNUC__
-  __cpuid(cinfo, 0x80000002);
-  memcpy(cpustring, cinfo, 16);
-  __cpuid(cinfo, 0x80000003);
-  memcpy(cpustring+16, cinfo, 16);
-  __cpuid(cinfo, 0x80000004);
-  memcpy(cpustring+32, cinfo, 16);
+  {
+    int cinfo[4];
+    __cpuid(cinfo, 0x80000002);
+    memcpy(cpustring, cinfo, 16);
+    __cpuid(cinfo, 0x80000003);
+    memcpy(cpustring+16, cinfo, 16);
+    __cpuid(cinfo, 0x80000004);
+    memcpy(cpustring+32, cinfo, 16);
+  }
 #endif
 
   if (grntest_outtype == OUT_TSV) {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index