pcsx2: gcc warning round 3

* various cast was overflowing
 - use unsigned integer for SSE mask
 - force SINGLE macro to use u32
* disable parenthesis warning, only a matter of coding style

Remains 2 wrong use of unsigned integer:
pcsx2/CDVD/InputIsoFile.cpp:96:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
pcsx2/Memory.cpp:108:86: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘vtlbHandler {aka unsigned int}’ inside { } is ill-formed in C++11 [-Wnarrowing]


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5689 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-06-30 11:43:12 +00:00
parent d81254469a
commit ba20bb0258
6 changed files with 8 additions and 8 deletions

View File

@ -93,7 +93,7 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
#-------------------------------------------------------------------------------
# Set some default compiler flags
#-------------------------------------------------------------------------------
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-missing-field-initializers -Wno-unused-local-typedefs")
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-missing-field-initializers -Wno-unused-local-typedefs -Wno-parentheses")
set(DEFAULT_GCC_FLAG "-m32 -msse -msse2 -march=i686 -pthread ${DEFAULT_WARNINGS}")
set(DEFAULT_CPP_FLAG "${DEFAULT_GCC_FLAG} -Wno-invalid-offsetof")

View File

@ -213,7 +213,7 @@ __ri void mpeg2_idct_add (const int last, s16 * block, s16 * dest, const int str
}
else
{
int DC = (block[0] + 4) >> 3;
s16 DC = (block[0] + 4) >> 3;
s16 dcf[2] = { DC, DC };
block[0] = block[63] = 0;

View File

@ -1008,8 +1008,8 @@ void SysCorePlugins::Load( const wxString (&folders)[PluginId_Count] )
{ 0, PCSX2_VersionHi, PCSX2_VersionLo, SVN_REV },
x86caps.PhysicalCores,
x86caps.LogicalCores,
(int)x86caps.PhysicalCores,
(int)x86caps.LogicalCores,
sizeof(wchar_t),
0,0,0,0,0,0,

View File

@ -570,8 +570,8 @@ void LWU()
cpuRegs.GPR.r[_Rt_].UD[0] = temp;
}
static const s32 LWL_MASK[4] = { 0xffffff, 0x0000ffff, 0x000000ff, 0x00000000 };
static const s32 LWR_MASK[4] = { 0x000000, 0xff000000, 0xffff0000, 0xffffff00 };
static const u32 LWL_MASK[4] = { 0xffffff, 0x0000ffff, 0x000000ff, 0x00000000 };
static const u32 LWR_MASK[4] = { 0x000000, 0xff000000, 0xffff0000, 0xffffff00 };
static const u8 LWL_SHIFT[4] = { 24, 16, 8, 0 };
static const u8 LWR_SHIFT[4] = { 0, 8, 16, 24 };

View File

@ -110,7 +110,7 @@ namespace DOUBLE {
// PS2 -> DOUBLE
//------------------------------------------------------------------
#define SINGLE(sign, exp, mant) (((sign)<<31) | ((exp)<<23) | (mant))
#define SINGLE(sign, exp, mant) (((u32)(sign)<<31) | ((u32)(exp)<<23) | (u32)(mant))
#define DOUBLE(sign, exp, mant) (((sign ## ULL)<<63) | ((exp ## ULL)<<52) | (mant ## ULL))
struct FPUd_Globals

View File

@ -72,7 +72,7 @@
//------------------------------------------------------------------
// Global Variables
//------------------------------------------------------------------
static const __aligned16 int SSEmovMask[ 16 ][ 4 ] =
static const __aligned16 uint SSEmovMask[ 16 ][ 4 ] =
{
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF },