From: Bart Van Assche Date: Mon, 14 Jun 2010 18:12:56 +0000 (+0000) Subject: Fixed compiler warnings about casting from const char * to char *. X-Git-Tag: svn/VALGRIND_3_6_0~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45037a25dc4bc00921867a11ceda6b936b2ef562;p=thirdparty%2Fvalgrind.git Fixed compiler warnings about casting from const char * to char *. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11176 --- diff --git a/coregrind/m_clientstate.c b/coregrind/m_clientstate.c index 7a27f44cae..d6dc7b2a58 100644 --- a/coregrind/m_clientstate.c +++ b/coregrind/m_clientstate.c @@ -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); diff --git a/coregrind/m_initimg/initimg-pathscan.c b/coregrind/m_initimg/initimg-pathscan.c index acde9c96b8..df47316bdf 100644 --- a/coregrind/m_initimg/initimg-pathscan.c +++ b/coregrind/m_initimg/initimg-pathscan.c @@ -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, '/')) { diff --git a/coregrind/m_initimg/priv_initimg_pathscan.h b/coregrind/m_initimg/priv_initimg_pathscan.h index 8245ce13b1..f3169b171f 100644 --- a/coregrind/m_initimg/priv_initimg_pathscan.h +++ b/coregrind/m_initimg/priv_initimg_pathscan.h @@ -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 diff --git a/coregrind/m_main.c b/coregrind/m_main.c index d245ee6937..538d085db5 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -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//cmdline\n"); diff --git a/include/pub_tool_clientstate.h b/include/pub_tool_clientstate.h index 9431783f67..81df4e5060 100644 --- a/include/pub_tool_clientstate.h +++ b/include/pub_tool_clientstate.h @@ -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