Char/ HChar cleanup: The various panic and printf-like functions
all take const HChar * arguments.
__FILE__ and __func__ expand into string literals (or character 
arrays initialised by them), as do strings created by the preprocessor 
e.g. #stuff.
This change reduces the number of warnings from 17000+ to ~5500


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13039 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c
index 3d9482b..93d333d 100644
--- a/coregrind/m_libcassert.c
+++ b/coregrind/m_libcassert.c
@@ -216,7 +216,7 @@
 }
 
 __attribute__ ((noreturn))
-static void report_and_quit ( const Char* report,
+static void report_and_quit ( const HChar* report,
                               UnwindStartRegs* startRegsIN )
 {
    Addr stacktop;
@@ -267,13 +267,13 @@
    VG_(exit)(1);
 }
 
-void VG_(assert_fail) ( Bool isCore, const Char* expr, const Char* file, 
-                        Int line, const Char* fn, const HChar* format, ... )
+void VG_(assert_fail) ( Bool isCore, const HChar* expr, const HChar* file, 
+                        Int line, const HChar* fn, const HChar* format, ... )
 {
    va_list vargs;
    Char buf[256];
-   Char* component;
-   Char* bugs_to;
+   const HChar* component;
+   const HChar* bugs_to;
 
    static Bool entered = False;
    if (entered) 
@@ -310,7 +310,7 @@
 }
 
 __attribute__ ((noreturn))
-static void panic ( Char* name, Char* report, Char* str,
+static void panic ( const HChar* name, const HChar* report, const HChar* str,
                     UnwindStartRegs* startRegs )
 {
    if (VG_(clo_xml))
@@ -319,23 +319,23 @@
    report_and_quit(report, startRegs);
 }
 
-void VG_(core_panic_at) ( Char* str, UnwindStartRegs* startRegs )
+void VG_(core_panic_at) ( const HChar* str, UnwindStartRegs* startRegs )
 {
    panic("valgrind", VG_BUGS_TO, str, startRegs);
 }
 
-void VG_(core_panic) ( Char* str )
+void VG_(core_panic) ( const HChar* str )
 {
    VG_(core_panic_at)(str, NULL);
 }
 
-void VG_(tool_panic) ( Char* str )
+void VG_(tool_panic) ( const HChar* str )
 {
    panic(VG_(details).name, VG_(details).bug_reports_to, str, NULL);
 }
 
 /* Print some helpful-ish text about unimplemented things, and give up. */
-void VG_(unimplemented) ( Char* msg )
+void VG_(unimplemented) ( const HChar* msg )
 {
    if (VG_(clo_xml))
       VG_(printf_xml)("</valgrindoutput>\n");
@@ -359,4 +359,3 @@
 /*--------------------------------------------------------------------*/
 /*--- end                                                          ---*/
 /*--------------------------------------------------------------------*/
-
diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
index bfa3488..1b91877 100644
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -522,7 +522,7 @@
    return count;
 }
 
-void VG_(fmsg_bad_option) ( HChar* opt, const HChar* format, ... )
+void VG_(fmsg_bad_option) ( const HChar* opt, const HChar* format, ... )
 {
    va_list vargs;
    va_start(vargs,format);
@@ -573,7 +573,7 @@
 }
 
 __attribute__((noreturn))
-void VG_(err_config_error) ( Char* format, ... )
+void VG_(err_config_error) ( const HChar* format, ... )
 {
    va_list vargs;
    va_start(vargs,format);
diff --git a/coregrind/pub_core_libcassert.h b/coregrind/pub_core_libcassert.h
index d86cbab..b7880d8 100644
--- a/coregrind/pub_core_libcassert.h
+++ b/coregrind/pub_core_libcassert.h
@@ -61,13 +61,13 @@
                               0)))
 
 __attribute__ ((__noreturn__))
-extern void  VG_(core_panic)      ( Char* str );
+extern void  VG_(core_panic)      ( const HChar* str );
 __attribute__ ((__noreturn__))
-extern void  VG_(core_panic_at)   ( Char* str, UnwindStartRegs* );
+extern void  VG_(core_panic_at)   ( const HChar* str, UnwindStartRegs* );
 
 /* Called when some unhandleable client behaviour is detected.
    Prints a msg and aborts. */
-extern void VG_(unimplemented) ( Char* msg )
+extern void VG_(unimplemented) ( const HChar* msg )
             __attribute__((__noreturn__));
 
 /* Show the state of all threads.  Mostly for debugging V. */
diff --git a/coregrind/pub_core_libcprint.h b/coregrind/pub_core_libcprint.h
index 4870771..5de2dc5 100644
--- a/coregrind/pub_core_libcprint.h
+++ b/coregrind/pub_core_libcprint.h
@@ -62,7 +62,7 @@
 /* Similarly - complain and stop if there is some kind of config
    error. */
 __attribute__((noreturn))
-extern void VG_(err_config_error) ( Char* format, ... );
+extern void VG_(err_config_error) ( const HChar* format, ... );
 
 #endif   // __PUB_CORE_LIBCPRINT_H