|
From: <sv...@va...> - 2010-06-14 18:13:06
|
Author: bart
Date: 2010-06-14 19:12:56 +0100 (Mon, 14 Jun 2010)
New Revision: 11176
Log:
Fixed compiler warnings about casting from const char * to char *.
Modified:
trunk/coregrind/m_clientstate.c
trunk/coregrind/m_initimg/initimg-pathscan.c
trunk/coregrind/m_initimg/priv_initimg_pathscan.h
trunk/coregrind/m_main.c
trunk/include/pub_tool_clientstate.h
Modified: trunk/coregrind/m_clientstate.c
===================================================================
--- trunk/coregrind/m_clientstate.c 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_clientstate.c 2010-06-14 18:12:56 UTC (rev 11176)
@@ -75,7 +75,7 @@
/* 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);
Modified: trunk/coregrind/m_initimg/initimg-pathscan.c
===================================================================
--- trunk/coregrind/m_initimg/initimg-pathscan.c 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_initimg/initimg-pathscan.c 2010-06-14 18:12:56 UTC (rev 11176)
@@ -130,7 +130,7 @@
}
// 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, '/')) {
Modified: trunk/coregrind/m_initimg/priv_initimg_pathscan.h
===================================================================
--- trunk/coregrind/m_initimg/priv_initimg_pathscan.h 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_initimg/priv_initimg_pathscan.h 2010-06-14 18:12:56 UTC (rev 11176)
@@ -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
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_main.c 2010-06-14 18:12:56 UTC (rev 11176)
@@ -1016,7 +1016,7 @@
/*====================================================================*/
// 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 @@
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");
Modified: trunk/include/pub_tool_clientstate.h
===================================================================
--- trunk/include/pub_tool_clientstate.h 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/include/pub_tool_clientstate.h 2010-06-14 18:12:56 UTC (rev 11176)
@@ -60,7 +60,7 @@
/* 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
|