fix compiler warnings


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1823 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c
index 804c8bb..f6ba33c 100644
--- a/coregrind/arch/x86-linux/vg_libpthread.c
+++ b/coregrind/arch/x86-linux/vg_libpthread.c
@@ -175,11 +175,10 @@
 
 static
 __attribute__((noreturn))
-void barf ( char* str )
+void barf ( const char* str )
 {
    char buf[1000];
-   buf[0] = 0;
-   strcat(buf, "\nvalgrind's libpthread.so: ");
+   strcpy(buf, "\nvalgrind's libpthread.so: ");
    strcat(buf, str);
    strcat(buf, "\n\n");
    VALGRIND_NON_SIMD_CALL2(VG_(message), Vg_UserMsg, buf);
@@ -221,7 +220,7 @@
 
 
 static
-void my_assert_fail ( Char* expr, Char* file, Int line, Char* fn )
+void my_assert_fail ( const Char* expr, const Char* file, Int line, const Char* fn )
 {
    char buf[1000];
    static Bool entered = False;
diff --git a/coregrind/vg_default.c b/coregrind/vg_default.c
index 1bb5408..5d8043b 100644
--- a/coregrind/vg_default.c
+++ b/coregrind/vg_default.c
@@ -45,7 +45,7 @@
  * make it very clear what went wrong! */
 
 static __attribute__ ((noreturn))
-void fund_panic ( Char* fn )
+void fund_panic ( const Char* fn )
 {
    VG_(printf)(
       "\nSkin error:\n"
@@ -56,7 +56,7 @@
 }
 
 static __attribute__ ((noreturn))
-void non_fund_panic ( Char* fn )
+void non_fund_panic ( const Char* fn )
 {
    VG_(printf)(
       "\nSkin error:\n"
@@ -67,7 +67,7 @@
 }
 
 static __attribute__ ((noreturn))
-void malloc_panic ( Char* fn )
+void malloc_panic ( const Char* fn )
 {
    VG_(printf)(
       "\nSkin error:\n"
diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h
index 59cb97c..11ec671 100644
--- a/coregrind/vg_include.h
+++ b/coregrind/vg_include.h
@@ -1028,8 +1028,8 @@
 			           __FILE__, __LINE__,                \
                                    __PRETTY_FUNCTION__), 0)))
 __attribute__ ((__noreturn__))
-extern void VG_(core_assert_fail) ( Char* expr, Char* file, 
-                                    Int line, Char* fn );
+extern void VG_(core_assert_fail) ( const Char* expr, const Char* file, 
+                                    Int line, const Char* fn );
 __attribute__ ((__noreturn__))
 extern void  VG_(core_panic)      ( Char* str );
 
@@ -1275,6 +1275,8 @@
    Exports of vg_symtab2.c
    ------------------------------------------------------------------ */
 
+extern void VG_(mini_stack_dump) ( Addr eips[], UInt n_eips );
+extern Char* VG_(describe_eip)(Addr eip, Char* buf, Int n_buf);
 extern void VG_(read_symbols)         ( void );
 extern void VG_(read_symtab_callback) ( Addr start, UInt size, 
                                         Char rr, Char ww, Char xx,
diff --git a/coregrind/vg_intercept.c b/coregrind/vg_intercept.c
index 2ee70a5..2326b12 100644
--- a/coregrind/vg_intercept.c
+++ b/coregrind/vg_intercept.c
@@ -216,7 +216,7 @@
 }
 
 static
-void my_assert_fail ( Char* expr, Char* file, Int line, Char* fn )
+void my_assert_fail ( const Char* expr, const Char* file, Int line, const Char* fn )
 {
    char buf[1000];
    static Bool entered = False;
diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c
index 804c8bb..f6ba33c 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -175,11 +175,10 @@
 
 static
 __attribute__((noreturn))
-void barf ( char* str )
+void barf ( const char* str )
 {
    char buf[1000];
-   buf[0] = 0;
-   strcat(buf, "\nvalgrind's libpthread.so: ");
+   strcpy(buf, "\nvalgrind's libpthread.so: ");
    strcat(buf, str);
    strcat(buf, "\n\n");
    VALGRIND_NON_SIMD_CALL2(VG_(message), Vg_UserMsg, buf);
@@ -221,7 +220,7 @@
 
 
 static
-void my_assert_fail ( Char* expr, Char* file, Int line, Char* fn )
+void my_assert_fail ( const Char* expr, const Char* file, Int line, const Char* fn )
 {
    char buf[1000];
    static Bool entered = False;
diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c
index 853d77b..a43fb18 100644
--- a/coregrind/vg_mylibc.c
+++ b/coregrind/vg_mylibc.c
@@ -1077,7 +1077,7 @@
    ------------------------------------------------------------------ */
 
 __attribute__ ((noreturn))
-static void report_and_quit ( Char* report )
+static void report_and_quit ( const Char* report )
 {
    VG_(pp_sched_status)();
    VG_(printf)("\n");
@@ -1093,8 +1093,8 @@
 }
 
 __attribute__ ((noreturn))
-static void assert_fail ( Char* expr, Char* name, Char* report,
-                          Char* file, Int line,   Char* fn )
+static void assert_fail ( const Char* expr, const Char* name, const Char* report,
+                          const Char* file, Int line, const Char* fn )
 {
    static Bool entered = False;
    if (entered) 
@@ -1105,13 +1105,13 @@
    report_and_quit(report);
 }
 
-void VG_(skin_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
+void VG_(skin_assert_fail) ( const Char* expr, const Char* file, Int line, const Char* fn )
 {
    assert_fail(expr, VG_(details).name, VG_(details).bug_reports_to, 
                file, line, fn);
 }
 
-void VG_(core_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
+void VG_(core_assert_fail) ( const Char* expr, const Char* file, Int line, const Char* fn )
 {
    assert_fail(expr, "valgrind", VG_EMAIL_ADDR, file, line, fn);
 }
diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c
index 51130b9..efc5b3b 100644
--- a/coregrind/vg_translate.c
+++ b/coregrind/vg_translate.c
@@ -1245,7 +1245,6 @@
    read-modified-written, it appears first as a read and then as a write.
    'tag' indicates whether we are looking at TempRegs or RealRegs.
 */
-__inline__
 Int VG_(get_reg_usage) ( UInstr* u, Tag tag, Int* regs, Bool* isWrites )
 {
 #  define RD(ono)    VG_UINSTR_READS_REG(ono, regs, isWrites)