]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Avoid compilation warnings with gcc-4.2.
authorJulian Seward <jseward@acm.org>
Tue, 1 May 2007 14:18:48 +0000 (14:18 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 1 May 2007 14:18:48 +0000 (14:18 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6722

coregrind/m_debuginfo/readelf.c
coregrind/m_scheduler/scheduler.c
coregrind/m_ume.c

index 5f24264c1cbdc936d7ac3f09ce55d130eeace6b0..39075db9a2bba44bccd5eedba8aff48ac70dfab8 100644 (file)
@@ -244,7 +244,7 @@ Bool get_elf_symbol_info (
       return False;
 
    /* Ignore if nameless, or zero-sized. */
-   if (sym->st_name == (ElfXX_Word)NULL
+   if (sym->st_name == (ElfXX_Word)0
        || /* VG_(strlen)(sym_name) == 0 */
           /* equivalent but cheaper ... */
           sym_name[0] == 0
index c8e41ae96447be4caf19c0e5618cbfbb9e24aab2..c3f09d05c32043d5d89bcf5019738dc2ef195544 100644 (file)
@@ -760,7 +760,7 @@ static void handle_tt_miss ( ThreadId tid )
 
 static void handle_syscall(ThreadId tid)
 {
-   ThreadState *tst = VG_(get_ThreadState)(tid);
+   ThreadState * volatile tst = VG_(get_ThreadState)(tid);
    Bool jumped; 
 
    /* Syscall may or may not block; either way, it will be
index bf8fd81d95a8af5875e8a9c1f3244b33bedfff69..efb9a2cc8002b2d7fcd36c670bcc7967f1899278 100644 (file)
@@ -835,7 +835,8 @@ Int VG_(do_exec)(const HChar* exe_name, ExeInfo* info)
    ret = do_exec_inner(exe_name, info);
 
    if (0 != ret) {
-      ret = do_exec_shell_followup(ret, (Char*)exe_name, info);
+      Char* exe_name_casted = (Char*)exe_name;
+      ret = do_exec_shell_followup(ret, exe_name_casted, info);
    }
    return ret;
 }