[llvm-commits] [vmkit] r52783 - in /vmkit/trunk: include/debug.h lib/N3/VMCore/Opcodes.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Thu Jun 26 08:46:11 PDT 2008


Author: geoffray
Date: Thu Jun 26 10:46:10 2008
New Revision: 52783

URL: http://llvm.org/viewvc/llvm-project?rev=52783&view=rev
Log:
Remove warnings when compiling N3 with debugging.


Modified:
    vmkit/trunk/include/debug.h
    vmkit/trunk/lib/N3/VMCore/Opcodes.cpp

Modified: vmkit/trunk/include/debug.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/debug.h?rev=52783&r1=52782&r2=52783&view=diff

==============================================================================
--- vmkit/trunk/include/debug.h (original)
+++ vmkit/trunk/include/debug.h Thu Jun 26 10:46:10 2008
@@ -53,23 +53,23 @@
 #if DEBUG > 0
 
   #ifdef WITH_COLOR
-    #define PRINT_DEBUG(symb, level, color, fmt, args...) \
+    #define PRINT_DEBUG(symb, level, color, args...) \
       if (symb > level) { \
           printf("%s%s%s", ESC, color, END); \
-          printf(fmt, ##args); \
+          printf(##args); \
           printf("%s%s%s", ESC, COLOR_NORMAL, END); \
           fflush(stdout); \
       }
   #else
     #define PRINT_DEBUG(symb, level, color, fmt, args...) \
       if (symb > level) { \
-        printf(fmt, ##args); \
+        printf(##args); \
         fflush(stdout); \
       }
   #endif
 
 #else
-#define PRINT_DEBUG(symb, level, color, fmt, args...) do {} while(0);
+#define PRINT_DEBUG(symb, level, color, args...) do {} while(0);
 #endif
 
 

Modified: vmkit/trunk/lib/N3/VMCore/Opcodes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Opcodes.cpp?rev=52783&r1=52782&r2=52783&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/Opcodes.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/Opcodes.cpp Thu Jun 26 10:46:10 2008
@@ -217,8 +217,8 @@
       PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
                   bytecodes[i]);
       PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "compiling %s::", compilingMethod->printString());
-      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]], 0);
-      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
+      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]]);
+      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
     }
     
     Opinfo* opinfo = &(opcodeInfos[i]);
@@ -1779,8 +1779,8 @@
         PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
                     bytecodes[i + 1]);
         PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "compiling %s::", compilingMethod->printString());
-        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]], 0);
-        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
+        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]]);
+        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
 
         switch (bytecodes[++i]) {
 
@@ -1951,8 +1951,8 @@
       PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
                   bytecodes[i]);
       PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "exploring %s::", compilingMethod->printString());
-      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]], 0);
-      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
+      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]]);
+      PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
     }
     
     switch (bytecodes[i]) {
@@ -2380,9 +2380,9 @@
       
         PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
                     bytecodes[i + 1]);
-        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "exploring ", 0);
-        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]], 0);
-        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
+        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "exploring ");
+        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]]);
+        PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
       
         switch (bytecodes[++i]) {
 





More information about the llvm-commits mailing list