Removed -Wno-parentheses from posix build and fixed warnings (bug 5745, r=psychonic).

This commit is contained in:
Kyle Sanderson
2013-07-18 15:50:57 -04:00
parent b96e0c8713
commit 29bc273e58
15 changed files with 64 additions and 68 deletions
-2
View File
@@ -3,8 +3,6 @@ import os
if 'ep2v' in SM.sdkInfo:
sdk = SM.sdkInfo['ep2v']
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'ep2v')
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
compiler['CFLAGS'].append('-Wno-parentheses')
name = 'game.tf2.ext.' + sdk['ext']
extension = AMBuild.AddJob(name)
+6 -6
View File
@@ -157,9 +157,9 @@ int copy_bytes(unsigned char *func, unsigned char* dest, int required_len) {
else if(!twoByte)
{
if((opcode & 0xC4) == 0x00 ||
(opcode & 0xF4) == 0x60 && ((opcode & 0x0A) == 0x02 || (opcode & 0x09) == 0x09) ||
((opcode & 0xF4) == 0x60 && ((opcode & 0x0A) == 0x02 || (opcode & 0x09) == 0x09)) ||
(opcode & 0xF0) == 0x80 ||
(opcode & 0xF8) == 0xC0 && (opcode & 0x0E) != 0x02 ||
((opcode & 0xF8) == 0xC0 && (opcode & 0x0E) != 0x02) ||
(opcode & 0xFC) == 0xD0 ||
(opcode & 0xF6) == 0xF6)
{
@@ -170,11 +170,11 @@ int copy_bytes(unsigned char *func, unsigned char* dest, int required_len) {
}
else
{
if((opcode & 0xF0) == 0x00 && (opcode & 0x0F) >= 0x04 && (opcode & 0x0D) != 0x0D ||
if(((opcode & 0xF0) == 0x00 && (opcode & 0x0F) >= 0x04 && (opcode & 0x0D) != 0x0D) ||
(opcode & 0xF0) == 0x30 ||
opcode == 0x77 ||
(opcode & 0xF0) == 0x80 ||
(opcode & 0xF0) == 0xA0 && (opcode & 0x07) <= 0x02 ||
((opcode & 0xF0) == 0xA0 && (opcode & 0x07) <= 0x02) ||
(opcode & 0xF8) == 0xC8)
{
// No mod R/M byte
@@ -250,7 +250,7 @@ int copy_bytes(unsigned char *func, unsigned char* dest, int required_len) {
(opcode & 0xFE) == 0xD4 || // AAD/AAM
(opcode & 0xF8) == 0xE0 || // LOOP/JCXZ
opcode == 0xEB ||
opcode == 0xF6 && (modRM & 0x30) == 0x00) // TEST
(opcode == 0xF6 && (modRM & 0x30) == 0x00)) // TEST
{
if (dest)
*dest++ = *func++;
@@ -275,7 +275,7 @@ int copy_bytes(unsigned char *func, unsigned char* dest, int required_len) {
(opcode & 0xFC) == 0xA0 ||
(opcode & 0xEE) == 0xA8 ||
opcode == 0xC7 ||
opcode == 0xF7 && (modRM & 0x30) == 0x00)
(opcode == 0xF7 && (modRM & 0x30) == 0x00))
{
if (dest) {
//Fix CALL/JMP offset