Fix VS2015 warnings

This commit is contained in:
kaetemi 2016-01-15 11:52:09 +01:00
parent deba711e0c
commit a8e56fed23
3 changed files with 6 additions and 6 deletions

View file

@ -864,18 +864,18 @@ public:
else if(type == "int") else if(type == "int")
{ {
if (!IsBadReadPtr(addr,sizeof(int))) if (!IsBadReadPtr(addr,sizeof(int)))
sprintf (tmp, "%d", *addr); sprintf (tmp, "%p", (void *)(*addr));
} }
else if (type == "char") else if (type == "char")
{ {
if (!IsBadReadPtr(addr,sizeof(char))) if (!IsBadReadPtr(addr,sizeof(char)))
if (nlisprint(*addr)) if (nlisprint(*addr))
{ {
sprintf (tmp, "'%c'", *addr); sprintf (tmp, "'%c'", (char)((*addr) & 0xFF));
} }
else else
{ {
sprintf (tmp, "%d", *addr); sprintf (tmp, "%p", (void *)(*addr));
} }
} }
else if (type == "char*") else if (type == "char*")
@ -932,7 +932,7 @@ public:
if(*addr == 0) if(*addr == 0)
sprintf (tmp, "<NULL>"); sprintf (tmp, "<NULL>");
else else
sprintf (tmp, "0x%p", *addr); sprintf (tmp, "0x%p", (void *)*addr);
} }
} }

View file

@ -945,7 +945,7 @@ CEvalNumExpr::TReturnState CEvalNumExpr::evalExpression (double &finalResult, TT
value = (double)(uint)((floor (value+0.5)==0.0)); value = (double)(uint)((floor (value+0.5)==0.0));
break; break;
case Tilde: case Tilde:
value = (double)~((uint)floor (value+0.5)); value = (double)(~((uint)floor (value+0.5)) & std::numeric_limits<uint>::max());
break; break;
case Minus: case Minus:
value = -value; value = -value;

View file

@ -99,7 +99,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr)
if (stop==0 && (parse[i] == ',' || parse[i] == ')')) if (stop==0 && (parse[i] == ',' || parse[i] == ')'))
{ {
char tmp[32]; char tmp[32];
sprintf(tmp, "=0x%p", *((DWORD_TYPE*)(stackAddr) + 2 + pos++)); sprintf(tmp, "=0x%p", (void *)(*((DWORD_TYPE*)(stackAddr) + 2 + pos++)));
str += tmp; str += tmp;
} }
str += parse[i]; str += parse[i];