First round of Char/HChar fixes for memcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13071
This commit is contained in:
Florian Krohm 2012-10-21 03:43:20 +00:00
parent 1f7fdd4b26
commit 2ec0ec9bb0
5 changed files with 11 additions and 11 deletions

View File

@ -99,7 +99,7 @@ struct _AddrInfo {
// blocks. // blocks.
struct { struct {
BlockKind block_kind; BlockKind block_kind;
Char* block_desc; // "block", "mempool" or user-defined const HChar* block_desc; // "block", "mempool" or user-defined
SizeT block_szB; SizeT block_szB;
PtrdiffT rwoffset; PtrdiffT rwoffset;
ExeContext* lastchange; ExeContext* lastchange;
@ -322,7 +322,7 @@ static void mc_pp_AddrInfo ( Addr a, AddrInfo* ai, Bool maybe_gcc )
SizeT block_szB = ai->Addr.Block.block_szB; SizeT block_szB = ai->Addr.Block.block_szB;
PtrdiffT rwoffset = ai->Addr.Block.rwoffset; PtrdiffT rwoffset = ai->Addr.Block.rwoffset;
SizeT delta; SizeT delta;
const Char* relative; const HChar* relative;
if (rwoffset < 0) { if (rwoffset < 0) {
delta = (SizeT)(-rwoffset); delta = (SizeT)(-rwoffset);
@ -412,7 +412,7 @@ static const HChar* xml_leak_kind ( Reachedness lossmode )
static void mc_pp_origin ( ExeContext* ec, UInt okind ) static void mc_pp_origin ( ExeContext* ec, UInt okind )
{ {
HChar* src = NULL; const HChar* src = NULL;
tl_assert(ec); tl_assert(ec);
switch (okind) { switch (okind) {
@ -1518,7 +1518,7 @@ Bool MC_(error_matches_suppression) ( Error* err, Supp* su )
} }
} }
Char* MC_(get_error_name) ( Error* err ) HChar* MC_(get_error_name) ( Error* err )
{ {
switch (VG_(get_error_kind)(err)) { switch (VG_(get_error_kind)(err)) {
case Err_RegParam: return "Param"; case Err_RegParam: return "Param";

View File

@ -382,7 +382,7 @@ Bool MC_(error_matches_suppression) ( Error* err, Supp* su );
Bool MC_(get_extra_suppression_info) ( Error* err, Bool MC_(get_extra_suppression_info) ( Error* err,
/*OUT*/Char* buf, Int nBuf ); /*OUT*/Char* buf, Int nBuf );
Char* MC_(get_error_name) ( Error* err ); HChar* MC_(get_error_name) ( Error* err );
/* Recording of errors */ /* Recording of errors */
void MC_(record_address_error) ( ThreadId tid, Addr a, Int szB, void MC_(record_address_error) ( ThreadId tid, Addr a, Int szB,
@ -429,7 +429,7 @@ typedef
Addr start; Addr start;
SizeT size; SizeT size;
ExeContext* where; ExeContext* where;
Char* desc; HChar* desc;
} }
CGenBlock; CGenBlock;

View File

@ -1373,7 +1373,7 @@ static void set_address_range_perms ( Addr a, SizeT lenT, UWord vabits16,
if (lenT > 256 * 1024 * 1024) { if (lenT > 256 * 1024 * 1024) {
if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) { if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
Char* s = "unknown???"; const HChar* s = "unknown???";
if (vabits16 == VA_BITS16_NOACCESS ) s = "noaccess"; if (vabits16 == VA_BITS16_NOACCESS ) s = "noaccess";
if (vabits16 == VA_BITS16_UNDEFINED) s = "undefined"; if (vabits16 == VA_BITS16_UNDEFINED) s = "undefined";
if (vabits16 == VA_BITS16_DEFINED ) s = "defined"; if (vabits16 == VA_BITS16_DEFINED ) s = "defined";
@ -5481,7 +5481,7 @@ static Bool mc_handle_client_request ( ThreadId tid, UWord* arg, UWord* ret )
/* VG_(printf)("allocated %d %p\n", i, cgbs); */ /* VG_(printf)("allocated %d %p\n", i, cgbs); */
cgbs[i].start = arg[1]; cgbs[i].start = arg[1];
cgbs[i].size = arg[2]; cgbs[i].size = arg[2];
cgbs[i].desc = VG_(strdup)("mc.mhcr.1", (Char *)arg[3]); cgbs[i].desc = (HChar *)VG_(strdup)("mc.mhcr.1", (Char *)arg[3]);
cgbs[i].where = VG_(record_ExeContext) ( tid, 0/*first_ip_delta*/ ); cgbs[i].where = VG_(record_ExeContext) ( tid, 0/*first_ip_delta*/ );
*ret = i; *ret = i;
} else } else

View File

@ -222,7 +222,7 @@ void delete_MC_Chunk (MC_Chunk* mc)
/*------------------------------------------------------------*/ /*------------------------------------------------------------*/
// XXX: should make this a proper error (bug #79311). // XXX: should make this a proper error (bug #79311).
static Bool complain_about_silly_args(SizeT sizeB, Char* fn) static Bool complain_about_silly_args(SizeT sizeB, const HChar* fn)
{ {
// Cast to a signed type to catch any unexpectedly negative args. We're // Cast to a signed type to catch any unexpectedly negative args. We're
// assuming here that the size asked for is not greater than 2^31 bytes // assuming here that the size asked for is not greater than 2^31 bytes

View File

@ -3843,7 +3843,7 @@ IRAtom* expr2vbits_Load_WRK ( MCEnv* mce,
IRAtom* addr, UInt bias ) IRAtom* addr, UInt bias )
{ {
void* helper; void* helper;
Char* hname; const HChar* hname;
IRDirty* di; IRDirty* di;
IRTemp datavbits; IRTemp datavbits;
IRAtom* addrAct; IRAtom* addrAct;
@ -4155,7 +4155,7 @@ void do_shadow_Store ( MCEnv* mce,
IROp mkAdd; IROp mkAdd;
IRType ty, tyAddr; IRType ty, tyAddr;
void* helper = NULL; void* helper = NULL;
Char* hname = NULL; const HChar* hname = NULL;
IRConst* c; IRConst* c;
tyAddr = mce->hWordTy; tyAddr = mce->hWordTy;