|
From: Dirk M. <mu...@kd...> - 2005-02-27 00:03:14
|
CVS commit by mueller:
const-correctness, fix compiler warnings
M +3 -3 coregrind/vg_messages.c 1.18
M +10 -10 include/tool.h.base 1.26
--- valgrind/include/tool.h.base #1.25:1.26
@@ -35,6 +35,6 @@
#include "basic_types.h"
-#include "tool_asm.h" // asm stuff
-#include "tool_arch.h" // arch-specific tool stuff
+#include "tool_asm.h" /* asm stuff */
+#include "tool_arch.h" /* arch-specific tool stuff */
#include "vki.h"
@@ -132,5 +132,5 @@
#define VG_CLO_STREQN(nn,s1,s2) (0==VG_(strncmp_ws)((s1),(s2),(nn)))
-// Higher-level command-line option recognisers; use in if/else chains
+/* Higher-level command-line option recognisers; use in if/else chains */
#define VG_BOOL_CLO(qq_option, qq_var) \
@@ -148,5 +148,5 @@
}
-// Bounded integer arg
+/* Bounded integer arg */
#define VG_BNUM_CLO(qq_option, qq_var, qq_lo, qq_hi) \
if (VG_CLO_STREQN(VG_(strlen)(qq_option)+1, arg, qq_option"=")) { \
@@ -187,5 +187,5 @@
Vg_DebugMsg, /* '?' == '-' */
Vg_DebugExtraMsg, /* '?' == '+' */
- Vg_ClientMsg, /* '?' == '*' */
+ Vg_ClientMsg /* '?' == '*' */
}
VgMsgKind;
@@ -193,11 +193,11 @@
/* Functions for building a message from multiple parts. */
extern int VG_(start_msg) ( VgMsgKind kind );
-extern int VG_(add_to_msg) ( Char* format, ... );
+extern int VG_(add_to_msg) ( const Char* format, ... );
/* Ends and prints the message. Appends a newline. */
extern int VG_(end_msg) ( void );
/* Send a single-part message. Appends a newline. */
-extern int VG_(message) ( VgMsgKind kind, Char* format, ... );
-extern int VG_(vmessage) ( VgMsgKind kind, Char* format, va_list vargs );
+extern int VG_(message) ( VgMsgKind kind, const Char* format, ... );
+extern int VG_(vmessage) ( VgMsgKind kind, const Char* format, va_list vargs );
@@ -1343,5 +1343,5 @@
JP_NONE, /* no prediction */
JP_TAKEN, /* predict taken */
- JP_NOT_TAKEN, /* predict not taken */
+ JP_NOT_TAKEN /* predict not taken */
} JumpPred;
@@ -1571,5 +1571,5 @@
Vg_SectBSS,
Vg_SectGOT,
- Vg_SectPLT,
+ Vg_SectPLT
}
VgSectKind;
--- valgrind/coregrind/vg_messages.c #1.17:1.18
@@ -69,5 +69,5 @@ static void add_timestamp ( Char *buf )
int
-VG_(add_to_msg) ( Char *format, ... )
+VG_(add_to_msg) ( const Char *format, ... )
{
int count;
@@ -79,5 +79,5 @@ VG_(add_to_msg) ( Char *format, ... )
}
-int VG_(vmessage) ( VgMsgKind kind, Char* format, va_list vargs )
+int VG_(vmessage) ( VgMsgKind kind, const Char* format, va_list vargs )
{
int count;
@@ -89,5 +89,5 @@ int VG_(vmessage) ( VgMsgKind kind, Char
/* Send a simple single-part message. */
-int VG_(message) ( VgMsgKind kind, Char* format, ... )
+int VG_(message) ( VgMsgKind kind, const Char* format, ... )
{
int count;
|