]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fixed compiler warnings about casting from const char * to char *.
authorBart Van Assche <bvanassche@acm.org>
Mon, 14 Jun 2010 18:12:56 +0000 (18:12 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 14 Jun 2010 18:12:56 +0000 (18:12 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11176

coregrind/m_clientstate.c
coregrind/m_initimg/initimg-pathscan.c
coregrind/m_initimg/priv_initimg_pathscan.h
coregrind/m_main.c
include/pub_tool_clientstate.h

index 7a27f44cae030fa2d6a084f3c37f483d4d186609..d6dc7b2a58d8212e4cd73026ba0c0edf169042de 100644 (file)
@@ -75,7 +75,7 @@ Int VG_(args_for_valgrind_noexecpass) = 0;
 
 /* The name of the client executable, as specified on the command
    line. */
-HChar* VG_(args_the_exename) = NULL;
+const HChar* VG_(args_the_exename) = NULL;
 
 // Client's original rlimit data and rlimit stack
 struct vki_rlimit VG_(client_rlimit_data);
index acde9c96b8adb86f6f7d162cba880463b50ac824..df47316bdf167e88ce9109fee8b23fb0c13ad03a 100644 (file)
@@ -130,7 +130,7 @@ static Bool match_executable(const char *entry)
 }
 
 // Returns NULL if it wasn't found.
-HChar* ML_(find_executable) ( HChar* exec )
+HChar* ML_(find_executable) ( const HChar* exec )
 {
    vg_assert(NULL != exec);
    if (VG_(strchr)(exec, '/')) {
index 8245ce13b1d588007b36eeee42805957dea1aff5..f3169b171f7e7cde7b7901488cc78f522fe46e7c 100644 (file)
@@ -32,6 +32,6 @@
 #ifndef __PRIV_INITIMG_PATHSCAN_H
 #define __PRIV_INITIMG_PATHSCAN_
 
-extern HChar* ML_(find_executable) ( HChar* exec );
+extern HChar* ML_(find_executable) ( const HChar* exec );
 
 #endif
index d245ee693726f16d7e096d459c143a623ea53763..538d085db583078352510dcb5b06b47ca8bf72f0 100644 (file)
@@ -1016,7 +1016,7 @@ static void print_file_vars(Char* format)
 /*====================================================================*/
 
 // Print the command, escaping any chars that require it.
-static void umsg_or_xml_arg(Char* arg,
+static void umsg_or_xml_arg(const Char* arg,
                             UInt (*umsg_or_xml)( const HChar*, ... ) )
 {
    SizeT len = VG_(strlen)(arg);
@@ -1855,7 +1855,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
       HChar  buf[50], buf2[50+64];
       HChar  nul[1];
       Int    fd, r;
-      HChar* exename;
+      const HChar* exename;
 
       VG_(debugLog)(1, "main", "Create fake /proc/<pid>/cmdline\n");
 
index 9431783f67cffed75c3eeb7452d15c2122e52686..81df4e5060ebc21f25d5687b4b257fbaef9ea928 100644 (file)
@@ -60,7 +60,7 @@ extern Int VG_(args_for_valgrind_noexecpass);
 
 /* The name of the client executable, as specified on the command
    line. */
-extern HChar* VG_(args_the_exename);
+extern const HChar* VG_(args_the_exename);
 
 
 #endif   // __PUB_TOOL_CLIENTSTATE_H