diff --git a/Externals/Bochs_disasm/PowerPCDisasm.cpp b/Externals/Bochs_disasm/PowerPCDisasm.cpp index 1a75fdd30e..22c4324654 100644 --- a/Externals/Bochs_disasm/PowerPCDisasm.cpp +++ b/Externals/Bochs_disasm/PowerPCDisasm.cpp @@ -389,7 +389,7 @@ typedef unsigned int ppc_word; { const char *cnd; - if (cnd = trap_condition[PPCGETD(in)]) { + if ((cnd = trap_condition[PPCGETD(in)]) != NULL) { dp->flags |= dmode; sprintf(dp->opcode,"t%c%s",dmode?'d':'w',cnd); imm(dp,in,0,2,0); @@ -408,7 +408,7 @@ typedef unsigned int ppc_word; if (i) dp->flags |= PPCF_64; sprintf(dp->opcode,"%si",cmpname[uimm*2+i]); - if (i = (int)PPCGETCRD(in)) { + if ((i = (int)PPCGETCRD(in))) { sprintf(oper,"cr%c,",'0'+i); dp->operands += 4; } @@ -491,7 +491,7 @@ typedef unsigned int ppc_word; if (d & 0x8000) d |= 0xffff0000; - if (offs = branch(dp,in,"",(in&2)?1:0,d)) { + if ((offs = branch(dp,in,"",(in&2)?1:0,d))) { oper += offs; *oper++ = ','; } @@ -619,7 +619,7 @@ typedef unsigned int ppc_word; if (i) dp->flags |= PPCF_64; strcpy(dp->opcode,cmpname[((in&PPCIDX2MASK)?2:0)+i]); - if (i = (int)PPCGETCRD(in)) + if ((i = (int)PPCGETCRD(in))) oper += sprintf(oper,"cr%c,",'0'+i); ra_rb(oper,in); } @@ -633,7 +633,7 @@ typedef unsigned int ppc_word; const char *cnd; int to = (int)PPCGETD(in); - if (cnd = trap_condition[to]) { + if ((cnd = trap_condition[to])) { dp->flags |= dmode; sprintf(dp->opcode,"t%c%s",dmode?'d':'w',cnd); ra_rb(dp->operands,in); @@ -991,7 +991,6 @@ typedef unsigned int ppc_word; static void ps(struct DisasmPara_PPC *dp,ppc_word inst) { - ppc_word pc = *dp->iaddr; char *op = dp->opcode; char *pr = dp->operands; switch ((inst>>1)&0x1F) @@ -1015,7 +1014,7 @@ typedef unsigned int ppc_word; return; case 23: strcpy(op, "ps_sel"); - sprintf(pr, "p%u>=0?p%u:p%u", FD, FA, FC, FB); + sprintf(pr, "p%u>=0?p%u:p%u", FD, FA, FC); return; case 24: strcpy(op, "ps_res"); @@ -1094,19 +1093,19 @@ typedef unsigned int ppc_word; return; case 0: strcpy(op, "ps_cmpu0"); - sprintf(pr, "ps_cmpu0", FD); + sprintf(pr, "ps_cmpu0"); return; case 32: strcpy(op,"ps_cmpq0"); - sprintf(pr, "ps_cmpo0", FD); + sprintf(pr, "ps_cmpo0"); return; case 64: strcpy(op,"ps_cmpu1"); - sprintf(pr, "ps_cmpu1", FD); + sprintf(pr, "ps_cmpu1"); return; case 96: strcpy(op,"ps_cmpo1"); - sprintf(pr, "ps_cmpo1", FD); + sprintf(pr, "ps_cmpo1"); return; case 528: strcpy(op,"ps_merge00"); @@ -1126,7 +1125,7 @@ typedef unsigned int ppc_word; return; case 1014: strcpy(op,"dcbz_l"); - sprintf(pr, ""); + *pr = '\0'; return; } @@ -1138,7 +1137,6 @@ typedef unsigned int ppc_word; static void ps_mem(struct DisasmPara_PPC *dp,ppc_word inst) { - ppc_word pc = *dp->iaddr; char *op = dp->opcode; char *pr = dp->operands; switch (PPCGETIDX(inst)) @@ -1149,7 +1147,7 @@ typedef unsigned int ppc_word; break; case 57: strcpy(op,"psq_lu"); - sprintf(pr, "", FD); + *pr = '\0'; break; case 60: strcpy(op,"psq_st"); diff --git a/Externals/Bochs_disasm/SConscript b/Externals/Bochs_disasm/SConscript index 709c00972d..ea62e8c8d8 100644 --- a/Externals/Bochs_disasm/SConscript +++ b/Externals/Bochs_disasm/SConscript @@ -14,9 +14,4 @@ files = [ if sys.platform == 'win32': files += [ "stdafx.cpp" ] -env_bochs = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']), - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), - ) - -env_bochs.StaticLibrary(env['local_libs'] + "bdisasm", files) +env.StaticLibrary(env['local_libs'] + "bdisasm", files) diff --git a/Externals/LZO/SConscript b/Externals/LZO/SConscript index ced88ab351..a3fecb668c 100644 --- a/Externals/LZO/SConscript +++ b/Externals/LZO/SConscript @@ -6,8 +6,4 @@ files = [ "minilzo.c", ] -env_lzo = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']), - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), - ) -env_lzo.StaticLibrary(env['local_libs'] + "lzo2", files) +env.StaticLibrary(env['local_libs'] + "lzo2", files) diff --git a/Externals/Lua/SConscript b/Externals/Lua/SConscript index d487772272..da5eaf654f 100644 --- a/Externals/Lua/SConscript +++ b/Externals/Lua/SConscript @@ -29,16 +29,10 @@ files = [ 'ltable.c', 'ltablib.c', 'ltm.c', - 'lua.c', - 'luac.c', 'lundump.c', 'lvm.c', 'lzio.c', 'print.c', ] -env_lua = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']), - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), - ) -env_lua.StaticLibrary(env['local_libs'] + "lua", files) +env.StaticLibrary(env['local_libs'] + "lua", files) diff --git a/Externals/Lua/lobject.h b/Externals/Lua/lobject.h index f1e447ef3b..855f92b22b 100644 --- a/Externals/Lua/lobject.h +++ b/Externals/Lua/lobject.h @@ -114,7 +114,7 @@ typedef struct lua_TValue { /* Macros to set values */ -#define setnilvalue(obj) ((obj)->tt=LUA_TNIL) +#define setnilvalue(obj) ((obj)->value.n=0, (obj)->tt=LUA_TNIL) #define setnvalue(obj,x) \ { TValue *i_o=(obj); i_o->value.n=(x); i_o->tt=LUA_TNUMBER; } diff --git a/Externals/OpenAL/include/xram.h b/Externals/OpenAL/include/xram.h index 5d83662424..cfff054329 100644 --- a/Externals/OpenAL/include/xram.h +++ b/Externals/OpenAL/include/xram.h @@ -91,4 +91,4 @@ typedef ALenum (__cdecl *EAXGetBufferMode)(ALuint buffer, ALint *value); // eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_AUTOMATIC")); // alBufferData(...); // -////////////////////////////////////////////////////////////////////////////// \ No newline at end of file +////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/SFML/src/SConscript b/Externals/SFML/src/SConscript index 45d0c81db3..e5130218ef 100644 --- a/Externals/SFML/src/SConscript +++ b/Externals/SFML/src/SConscript @@ -14,9 +14,4 @@ files = [ "SFML/Network/Unix/SocketHelper.cpp", ] -env_sfml = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']), - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), - ) - -env_sfml.StaticLibrary(env['local_libs'] + "sfml-network", files) +env.StaticLibrary(env['local_libs'] + "sfml-network", files) diff --git a/Externals/SFML/src/SFML/Network/Packet.cpp b/Externals/SFML/src/SFML/Network/Packet.cpp index b1472b424f..61edec100c 100644 --- a/Externals/SFML/src/SFML/Network/Packet.cpp +++ b/Externals/SFML/src/SFML/Network/Packet.cpp @@ -209,7 +209,7 @@ Packet& Packet::operator >>(double& Data) Packet& Packet::operator >>(char* Data) { // First extract string length - Uint32 Length; + Uint32 Length = 0; *this >> Length; if ((Length > 0) && CheckSize(Length)) @@ -227,7 +227,7 @@ Packet& Packet::operator >>(char* Data) Packet& Packet::operator >>(std::string& Data) { // First extract string length - Uint32 Length; + Uint32 Length = 0; *this >> Length; Data.clear(); @@ -245,7 +245,7 @@ Packet& Packet::operator >>(std::string& Data) Packet& Packet::operator >>(wchar_t* Data) { // First extract string length - Uint32 Length; + Uint32 Length = 0; *this >> Length; if ((Length > 0) && CheckSize(Length * sizeof(Int32))) @@ -253,7 +253,7 @@ Packet& Packet::operator >>(wchar_t* Data) // Then extract characters for (Uint32 i = 0; i < Length; ++i) { - Uint32 c; + Uint32 c = 0; *this >> c; Data[i] = static_cast(c); } @@ -265,7 +265,7 @@ Packet& Packet::operator >>(wchar_t* Data) Packet& Packet::operator >>(std::wstring& Data) { // First extract string length - Uint32 Length; + Uint32 Length = 0; *this >> Length; Data.clear(); @@ -274,7 +274,7 @@ Packet& Packet::operator >>(std::wstring& Data) // Then extract characters for (Uint32 i = 0; i < Length; ++i) { - Uint32 c; + Uint32 c = 0; *this >> c; Data += static_cast(c); } diff --git a/Externals/SOIL/SConscript b/Externals/SOIL/SConscript index 2564300faf..f78edceb10 100644 --- a/Externals/SOIL/SConscript +++ b/Externals/SOIL/SConscript @@ -9,10 +9,4 @@ files = [ 'stb_image_aug.c' ] -env_soil = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']), - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), - parse_flags = ['-fPIC'] - ) - -env_soil.StaticLibrary(env['local_libs'] + "SOIL", files) +env.StaticLibrary(env['local_libs'] + "SOIL", files) diff --git a/Externals/SOIL/SOIL.c b/Externals/SOIL/SOIL.c index 3e359c3551..d5a8df9a9a 100644 --- a/Externals/SOIL/SOIL.c +++ b/Externals/SOIL/SOIL.c @@ -45,7 +45,7 @@ #include /* error reporting */ -char *result_string_pointer = "SOIL initialized"; +const char *result_string_pointer = "SOIL initialized"; /* for loading cube maps */ enum{ @@ -54,7 +54,7 @@ enum{ SOIL_CAPABILITY_PRESENT = 1 }; -static int has_cubemap_capability = SOIL_CAPABILITY_UNKNOWN; +/* static int has_cubemap_capability = SOIL_CAPABILITY_UNKNOWN; */ int query_cubemap_capability( void ); #define SOIL_TEXTURE_WRAP_R 0x8072 #define SOIL_CLAMP_TO_EDGE 0x812F @@ -71,15 +71,15 @@ int query_cubemap_capability( void ); #define SOIL_PROXY_TEXTURE_CUBE_MAP 0x851B #define SOIL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C /* for non-power-of-two texture */ -static int has_NPOT_capability = SOIL_CAPABILITY_UNKNOWN; +/* static int has_NPOT_capability = SOIL_CAPABILITY_UNKNOWN; */ int query_NPOT_capability( void ); /* for texture rectangles */ -static int has_tex_rectangle_capability = SOIL_CAPABILITY_UNKNOWN; +/* static int has_tex_rectangle_capability = SOIL_CAPABILITY_UNKNOWN; */ int query_tex_rectangle_capability( void ); #define SOIL_TEXTURE_RECTANGLE_ARB 0x84F5 #define SOIL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 /* for using DXT compression */ -static int has_DXT_capability = SOIL_CAPABILITY_UNKNOWN; +/* static int has_DXT_capability = SOIL_CAPABILITY_UNKNOWN; */ int query_DXT_capability( void ); #define SOIL_RGB_S3TC_DXT1 0x83F0 #define SOIL_RGBA_S3TC_DXT1 0x83F1 @@ -1434,7 +1434,7 @@ int } #endif -unsigned char* +unsigned char * SOIL_load_image ( const char *filename, @@ -1442,7 +1442,7 @@ unsigned char* int force_channels ) { - unsigned char *result = stbi_load( filename, + stbi_uc *result = stbi_load( filename, width, height, channels, force_channels ); if( result == NULL ) { @@ -1454,7 +1454,7 @@ unsigned char* return result; } -unsigned char* +unsigned char * SOIL_load_image_from_memory ( const unsigned char *const buffer, @@ -1463,7 +1463,7 @@ unsigned char* int force_channels ) { - unsigned char *result = stbi_load_from_memory( + stbi_uc *result = stbi_load_from_memory( buffer, buffer_length, width, height, channels, force_channels ); diff --git a/Externals/SOIL/image_DXT.c b/Externals/SOIL/image_DXT.c index eb90be67bc..3c7883e9af 100644 --- a/Externals/SOIL/image_DXT.c +++ b/Externals/SOIL/image_DXT.c @@ -107,7 +107,7 @@ unsigned char* convert_image_to_DXT1( int i, j, x, y; unsigned char ublock[16*3]; unsigned char cblock[8]; - int index = 0, chan_step = 1; + int cindex = 0, chan_step = 1; int block_count = 0; /* error check */ *out_size = 0; @@ -172,7 +172,7 @@ unsigned char* convert_image_to_DXT1( /* copy the data from the block into the main block */ for( x = 0; x < 8; ++x ) { - compressed[index++] = cblock[x]; + compressed[cindex++] = cblock[x]; } } } @@ -188,7 +188,7 @@ unsigned char* convert_image_to_DXT5( int i, j, x, y; unsigned char ublock[16*4]; unsigned char cblock[8]; - int index = 0, chan_step = 1; + int cindex = 0, chan_step = 1; int block_count = 0, has_alpha; /* error check */ *out_size = 0; @@ -259,7 +259,7 @@ unsigned char* convert_image_to_DXT5( /* copy the data from the compressed alpha block into the main buffer */ for( x = 0; x < 8; ++x ) { - compressed[index++] = cblock[x]; + compressed[cindex++] = cblock[x]; } /* then compress the color block */ ++block_count; @@ -267,7 +267,7 @@ unsigned char* convert_image_to_DXT5( /* copy the data from the compressed color block into the main buffer */ for( x = 0; x < 8; ++x ) { - compressed[index++] = cblock[x]; + compressed[cindex++] = cblock[x]; } } } diff --git a/Externals/SOIL/stb_image_aug.c b/Externals/SOIL/stb_image_aug.c index 61247ceb1a..0783d0b4a8 100644 --- a/Externals/SOIL/stb_image_aug.c +++ b/Externals/SOIL/stb_image_aug.c @@ -117,14 +117,14 @@ typedef unsigned char validate_uint32[sizeof(uint32)==4]; // // this is not threadsafe -static char *failure_reason; +static const char *failure_reason; -char *stbi_failure_reason(void) +const char *stbi_failure_reason(void) { return failure_reason; } -static int e(char *str) +static int e(const char *str) { failure_reason = str; return 0; @@ -333,10 +333,10 @@ extern int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, in static float h2l_gamma_i=1.0f/2.2f, h2l_scale_i=1.0f; static float l2h_gamma=2.2f, l2h_scale=1.0f; -void stbi_hdr_to_ldr_gamma(float gamma) { h2l_gamma_i = 1/gamma; } +void stbi_hdr_to_ldr_gamma(float gammafactor) { h2l_gamma_i = 1/gammafactor; } void stbi_hdr_to_ldr_scale(float scale) { h2l_scale_i = 1/scale; } -void stbi_ldr_to_hdr_gamma(float gamma) { l2h_gamma = gamma; } +void stbi_ldr_to_hdr_gamma(float gammafactor) { l2h_gamma = gammafactor; } void stbi_ldr_to_hdr_scale(float scale) { l2h_scale = scale; } #endif @@ -368,6 +368,8 @@ typedef struct static void start_file(stbi *s, FILE *f) { s->img_file = f; + s->img_buffer = NULL; + s->img_buffer_end = NULL; } #endif @@ -1128,14 +1130,14 @@ static int process_marker(jpeg *z, int m) L = get16(&z->s)-2; while (L > 0) { uint8 *v; - int sizes[16],i,m=0; + int sizes[16],i,m2=0; int q = get8(&z->s); int tc = q >> 4; int th = q & 15; if (tc > 1 || th > 3) return e("bad DHT header","Corrupt JPEG"); for (i=0; i < 16; ++i) { sizes[i] = get8(&z->s); - m += sizes[i]; + m2 += sizes[i]; } L -= 17; if (tc == 0) { @@ -1145,9 +1147,9 @@ static int process_marker(jpeg *z, int m) if (!build_huffman(z->huff_ac+th, sizes)) return 0; v = z->huff_ac[th].values; } - for (i=0; i < m; ++i) + for (i=0; i < m2; ++i) v[i] = get8u(&z->s); - L -= m; + L -= m2; } return L==0; } @@ -1671,10 +1673,10 @@ static int zbuild_huffman(zhuffman *z, uint8 *sizelist, int num) z->size[c] = (uint8)s; z->value[c] = (uint16)i; if (s <= ZFAST_BITS) { - int k = bit_reverse(next_code[s],s); - while (k < (1 << ZFAST_BITS)) { - z->fast[k] = (uint16) c; - k += (1 << s); + int k2 = bit_reverse(next_code[s],s); + while (k2 < (1 << ZFAST_BITS)) { + z->fast[k2] = (uint16) c; + k2 += (1 << s); } } ++next_code[s]; @@ -1947,12 +1949,12 @@ static int parse_zlib(zbuf *a, int parse_header) return 1; } -static int do_zlib(zbuf *a, char *obuf, int olen, int exp, int parse_header) +static int do_zlib(zbuf *a, char *obuf, int olen, int expandable, int parse_header) { a->zout_start = obuf; a->zout = obuf; a->zout_end = obuf + olen; - a->z_expandable = exp; + a->z_expandable = expandable; return parse_zlib(a, parse_header); } @@ -2092,10 +2094,13 @@ static int create_png_image_raw(png *a, uint8 *raw, uint32 raw_len, int out_n, u a->out = (uint8 *) malloc(x * y * out_n); if (!a->out) return e("outofmem", "Out of memory"); if (!stbi_png_partial) { - if (s->img_x == x && s->img_y == y) - if (raw_len != (img_n * x + 1) * y) return e("not enough pixels","Corrupt PNG"); - else // interlaced: - if (raw_len < (img_n * x + 1) * y) return e("not enough pixels","Corrupt PNG"); + if (s->img_x == x && s->img_y == y) { + if (raw_len != (img_n * x + 1) * y) + return e("not enough pixels","Corrupt PNG"); + } else { // interlaced: + if (raw_len < (img_n * x + 1) * y) + return e("not enough pixels","Corrupt PNG"); + } } for (j=0; j < y; ++j) { uint8 *cur = a->out + stride*j; @@ -2861,7 +2866,7 @@ static stbi_uc *tga_load(stbi *s, int *x, int *y, int *comp, int req_comp) unsigned char *tga_palette = NULL; int i, j; unsigned char raw_data[4]; - unsigned char trans_data[4]; + unsigned char trans_data[4] = {0,0,0,0}; int RLE_count = 0; int RLE_repeating = 0; int read_next_pixel = 1; @@ -2995,6 +3000,8 @@ static stbi_uc *tga_load(stbi *s, int *x, int *y, int *comp, int req_comp) trans_data[2] = raw_data[0]; trans_data[3] = raw_data[3]; break; + default: + return NULL; } // clear the reading flag for the next pixel read_next_pixel = 0; @@ -3305,7 +3312,7 @@ stbi_uc *stbi_psd_load_from_memory (stbi_uc const *buffer, int len, int *x, int #ifndef STBI_NO_HDR static int hdr_test(stbi *s) { - char *signature = "#?RADIANCE\n"; + const char *signature = "#?RADIANCE\n"; int i; for (i=0; signature[i]; ++i) if (get8(s) != signature[i]) @@ -3335,10 +3342,10 @@ int stbi_hdr_test_file(FILE *f) #define HDR_BUFLEN 1024 static char *hdr_gettoken(stbi *z, char *buffer) { - int len=0; - char *s = buffer, c = '\0'; + int len=0; + char c = '\0'; - c = get8(z); + c = get8(z); while (!at_eof(z) && c != '\n') { buffer[len++] = c; @@ -3645,7 +3652,7 @@ stbi_uc *stbi_hdr_load_rgbe_memory(stbi_uc *buffer, int len, int *x, int *y, int static void write8(FILE *f, int x) { uint8 z = (uint8) x; fwrite(&z,1,1,f); } -static void writefv(FILE *f, char *fmt, va_list v) +static void writefv(FILE *f, const char *fmt, va_list v) { while (*fmt) { switch (*fmt++) { @@ -3661,7 +3668,7 @@ static void writefv(FILE *f, char *fmt, va_list v) } } -static void writef(FILE *f, char *fmt, ...) +static void writef(FILE *f, const char *fmt, ...) { va_list v; va_start(v, fmt); @@ -3708,7 +3715,7 @@ static void write_pixels(FILE *f, int rgb_dir, int vdir, int x, int y, int comp, } } -static int outfile(char const *filename, int rgb_dir, int vdir, int x, int y, int comp, void *data, int alpha, int pad, char *fmt, ...) +static int outfile(char const *filename, int rgb_dir, int vdir, int x, int y, int comp, void *data, int alpha, int pad, const char *fmt, ...) { FILE *f = fopen(filename, "wb"); if (f) { diff --git a/Externals/SOIL/stb_image_aug.h b/Externals/SOIL/stb_image_aug.h index 52ea75ca23..c35a9c570d 100644 --- a/Externals/SOIL/stb_image_aug.h +++ b/Externals/SOIL/stb_image_aug.h @@ -204,17 +204,17 @@ extern float *stbi_loadf_from_file (FILE *f, int *x, int *y, i #endif extern float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp); -extern void stbi_hdr_to_ldr_gamma(float gamma); +extern void stbi_hdr_to_ldr_gamma(float gammafactor); extern void stbi_hdr_to_ldr_scale(float scale); -extern void stbi_ldr_to_hdr_gamma(float gamma); +extern void stbi_ldr_to_hdr_gamma(float gammafactor); extern void stbi_ldr_to_hdr_scale(float scale); #endif // STBI_NO_HDR // get a VERY brief reason for failure // NOT THREADSAFE -extern char *stbi_failure_reason (void); +extern const char *stbi_failure_reason (void); // free the loaded image -- this is just free() extern void stbi_image_free (void *retval_from_stbi_load); diff --git a/Externals/WiiUseSrc/Src/SConscript b/Externals/WiiUseSrc/Src/SConscript index 405a19feb3..3f3136d50b 100644 --- a/Externals/WiiUseSrc/Src/SConscript +++ b/Externals/WiiUseSrc/Src/SConscript @@ -25,22 +25,6 @@ if env['HAVE_BLUEZ']: if sys.platform == 'darwin': files += [ "io_osx.m", ] -if sys.platform == 'darwin': - env_wiiuse = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']) + ' -fvisibility=default -x objective-c++', - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']) + ' -x objective-c++', - ) -else: - env_wiiuse = env.Clone( - CCFLAGS = env.filterWarnings(env['CCFLAGS']) + ' -fvisibility=default', - CXXFLAGS = env.filterWarnings(env['CXXFLAGS']), - parse_flags = ['-fPIC'] - ) - -libs = [ - 'm', -] - -env_wiiuse.StaticLibrary(env['local_libs'] + "wiiuse", files, LIBS=libs) +env.StaticLibrary(env['local_libs'] + "wiiuse", files, LIBS='m') env['HAVE_WIIUSE'] = 1 diff --git a/Externals/WiiUseSrc/Src/guitar_hero_3.c b/Externals/WiiUseSrc/Src/guitar_hero_3.c index 741fbbc0df..ba3a1f78af 100644 --- a/Externals/WiiUseSrc/Src/guitar_hero_3.c +++ b/Externals/WiiUseSrc/Src/guitar_hero_3.c @@ -57,8 +57,6 @@ static void guitar_hero_3_pressed_buttons(struct guitar_hero_3_t* gh3, short now * @return Returns 1 if handshake was successful, 0 if not. */ int guitar_hero_3_handshake(struct wiimote_t* wm, struct guitar_hero_3_t* gh3, byte* data, unsigned short len) { - int offset = 0; - /* * The good fellows that made the Guitar Hero 3 controller * failed to factory calibrate the devices. There is no diff --git a/Externals/WiiUseSrc/Src/io_nix.c b/Externals/WiiUseSrc/Src/io_nix.c index 1e61341e23..62ac73e046 100644 --- a/Externals/WiiUseSrc/Src/io_nix.c +++ b/Externals/WiiUseSrc/Src/io_nix.c @@ -267,7 +267,6 @@ int wiiuse_io_read(struct wiimote_t* wm) { struct timeval tv; fd_set fds; int r; - int i; if (!wm) return 0; diff --git a/Externals/WiiUseSrc/Src/ir.c b/Externals/WiiUseSrc/Src/ir.c index 7be8f64974..ab1ba519e4 100644 --- a/Externals/WiiUseSrc/Src/ir.c +++ b/Externals/WiiUseSrc/Src/ir.c @@ -682,7 +682,7 @@ static float ir_distance(struct ir_dot_t* dot) { * precision for a big increase in usability. */ static int ir_correct_for_bounds(int* x, int* y, enum aspect_t aspect, int offset_x, int offset_y) { - int x0, y0; + int xzero, yzero; int xs, ys; if (aspect == WIIUSE_ASPECT_16_9) { @@ -693,13 +693,13 @@ static int ir_correct_for_bounds(int* x, int* y, enum aspect_t aspect, int offse ys = WM_ASPECT_4_3_Y; } - x0 = ((1024 - xs) / 2) + offset_x; - y0 = ((768 - ys) / 2) + offset_y; + xzero = ((1024 - xs) / 2) + offset_x; + yzero = ((768 - ys) / 2) + offset_y; - if ((*x >= x0) - && (*x <= (x0 + xs)) - && (*y >= y0) - && (*y <= (y0 + ys))) + if ((*x >= xzero) + && (*x <= (xzero + xs)) + && (*y >= yzero) + && (*y <= (yzero + ys))) { *x -= offset_x; *y -= offset_y; diff --git a/SConstruct b/SConstruct index 03ba620d0f..968f417548 100644 --- a/SConstruct +++ b/SConstruct @@ -26,10 +26,16 @@ warnings = [ 'packed', 'no-conversion', ] +# XXX check for the availability of these (in GCC 4.3 or newer) +if sys.platform != 'darwin': + warnings.append('no-array-bounds') + warnings.append('no-unused-result') + compileFlags = [ '-fno-exceptions', '-fno-strict-aliasing', '-msse2', + '-fPIC', ] cppDefines = [ @@ -111,15 +117,18 @@ vars.AddVariables( BoolVariable('shared_soil', 'Use system shared libSOIL', False), BoolVariable('shared_lzo', 'Use system shared liblzo2', False), BoolVariable('shared_sfml', 'Use system shared libsfml-network', False), - PathVariable('userdir', 'Set the name of the user data directory in home', '.dolphin-emu', PathVariable.PathAccept), + PathVariable('userdir', 'Set the name of the user data directory in home', + '.dolphin-emu', PathVariable.PathAccept), EnumVariable('install', 'Choose a local or global installation', 'local', allowed_values = ('local', 'global'), ignorecase = 2 ), - PathVariable('prefix', 'Installation prefix (only used for a global build)', '/usr', PathVariable.PathAccept), - PathVariable('destdir', 'Temporary install location (for package building)', None, PathVariable.PathAccept), + PathVariable('prefix', 'Installation prefix (only used for a global build)', + '/usr', PathVariable.PathAccept), + PathVariable('destdir', 'Temporary install location (for package building)', + None, PathVariable.PathAccept), EnumVariable('flavor', 'Choose a build flavor', 'release', - allowed_values = ('release', 'devel', 'debug', 'fastlog', 'prof'), + allowed_values = ('release','devel','debug','fastlog','prof'), ignorecase = 2 ), PathVariable('wxconfig', 'Path to the wxconfig', None), @@ -191,6 +200,7 @@ if (flavour == 'debug'): cppDefines.append('NDEBUG') elif (flavour == 'devel'): compileFlags.append('-ggdb') + warnings.append('error') elif (flavour == 'fastlog'): compileFlags.append('-O3') cppDefines.append('DEBUGFAST') @@ -200,8 +210,6 @@ elif (flavour == 'prof'): elif (flavour == 'release'): compileFlags.append('-O3') compileFlags.append('-fomit-frame-pointer'); -# XXX please test -Werror builds on Linux and Windows and remove this condition -if sys.platform == 'darwin': warnings.append('error') # more warnings if env['lint']: @@ -238,7 +246,8 @@ tests = {'CheckWXConfig' : wxconfig.CheckWXConfig, } #object files -env['build_dir'] = os.path.join(basedir, 'Build', platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep) +env['build_dir'] = os.path.join(basedir, 'Build', + platform.system() + '-' + platform.machine() + '-' + env['flavor'] + os.sep) # Static libs go here env['local_libs'] = env['build_dir'] + os.sep + 'libs' + os.sep @@ -260,7 +269,8 @@ if (env['install'] == 'global'): env['plugin_dir'] = env['prefix'] + 'lib/dolphin-emu/' env['data_dir'] = env['prefix'] + "share/dolphin-emu/" else: - env['prefix'] = os.path.join(env['base_dir'] + 'Binary', platform.system() + '-' + platform.machine() + extra + os.sep) + env['prefix'] = os.path.join(env['base_dir'] + 'Binary', + platform.system() + '-' + platform.machine() + extra + os.sep) env['binary_dir'] = env['prefix'] env['plugin_dir'] = env['prefix'] + 'plugins/' env['data_dir'] = env['prefix'] @@ -333,7 +343,8 @@ if not env['SHARED_LZO']: env['SHARED_SFML'] = 0; if env['shared_sfml']: # TODO: Check the version of sfml. It should be at least version 1.5 - env['SHARED_SFML'] = conf.CheckPKG('sfml-network') and conf.CheckCXXHeader("SFML/Network/Ftp.hpp") + env['SHARED_SFML'] = conf.CheckPKG('sfml-network') and \ + conf.CheckCXXHeader("SFML/Network/Ftp.hpp") if not env['SHARED_SFML']: print "shared sfml-network library not detected" print "falling back to the static library" @@ -349,8 +360,7 @@ if sys.platform == 'darwin': env['HAVE_X11'] = 0 env['CC'] = "gcc-4.2" env['CXX'] = "g++-4.2" - env['CFLAGS'] += ['-arch' , 'x86_64' , '-arch' , 'i386'] - env['CXXFLAGS'] += ['-arch' , 'x86_64' , '-arch' , 'i386'] + env['CCFLAGS'] += ['-arch' , 'x86_64' , '-arch' , 'i386'] env['LINKFLAGS'] += ['-arch' , 'x86_64' , '-arch' , 'i386'] conf.Define('MAP_32BIT', 0) else: @@ -449,14 +459,11 @@ if env['HAVE_WX']: else: print "WX not found or disabled, not building GUI" -# add methods from utils to env -env.AddMethod(utils.filterWarnings) - rev = utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h", "Source/Core/Common/Src/svnrev.h") # print a nice progress indication when not compiling -Progress(['-\r', '\\\r', '|\r', '/\r'], interval = 5) +Progress(['-\r', '\\\r', '|\r', '/\r'], file=open('/dev/tty', 'w'), interval=5) # Setup destdir for package building # Warning: The program will not run from this location. It is assumed the diff --git a/SconsTests/utils.py b/SconsTests/utils.py index f8e71e146f..5b38f109c8 100644 --- a/SconsTests/utils.py +++ b/SconsTests/utils.py @@ -1,14 +1,6 @@ import os import platform -# methods that should be added to env -def filterWarnings(self, flags): - return ' '.join( - flag - for flag in flags - if not flag.startswith('-W') - ) - # taken from scons wiki def CheckPKGConfig(context, version): context.Message( 'Checking for pkg-config version > %s... ' % version) @@ -28,8 +20,7 @@ def CheckFramework(context, name): } """, '.c') if not ret: - context.env.Replace(FRAMEWORKS = lastFRAMEWORKS -) + context.env.Replace(FRAMEWORKS = lastFRAMEWORKS) return ret diff --git a/Source/Core/AudioCommon/Src/SConscript b/Source/Core/AudioCommon/Src/SConscript index d0b1bcefb8..746bea11f2 100644 --- a/Source/Core/AudioCommon/Src/SConscript +++ b/Source/Core/AudioCommon/Src/SConscript @@ -12,7 +12,6 @@ files = [ ] acenv = env.Clone() -acenv.Append(CXXFLAGS = [ '-fPIC' ]) if acenv['HAVE_OPENAL']: files += [ 'OpenALStream.cpp', 'aldlist.cpp' ] diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h index a9ec34adc6..92797234d4 100644 --- a/Source/Core/Common/Src/ChunkFile.h +++ b/Source/Core/Common/Src/ChunkFile.h @@ -93,7 +93,7 @@ public: x.clear(); while (number > 0) { - unsigned int first; + unsigned int first = 0; Do(first); std::string second; Do(second); diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 1163415d3a..7827c7c15b 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -64,4 +64,4 @@ private: int num_entries_; }; -#endif // _LINEAR_DISKCACHE \ No newline at end of file +#endif // _LINEAR_DISKCACHE diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript index 4bd50b60d5..8c3aba54c0 100644 --- a/Source/Core/Common/Src/SConscript +++ b/Source/Core/Common/Src/SConscript @@ -49,5 +49,4 @@ if sys.platform == 'win32': files += [ "stdafx.cpp" ] env_common = env.Clone() -env_common.Append(CXXFLAGS = [ '-fPIC' ]) env_common.StaticLibrary(env['local_libs'] + "common", files) diff --git a/Source/Core/Core/Src/LuaInterface.cpp b/Source/Core/Core/Src/LuaInterface.cpp index 6802c32c9f..d70436ffa0 100644 --- a/Source/Core/Core/Src/LuaInterface.cpp +++ b/Source/Core/Core/Src/LuaInterface.cpp @@ -40,7 +40,7 @@ extern "C" { #include "lstate.h" }; -// TODO Count: 7 +// TODO Count: 7 #if defined(DEBUG) || defined(DEBUGFAST) bool Debug = true; @@ -1111,7 +1111,7 @@ DEFINE_LUA_FUNCTION(emulua_wait, "") // we're only calling this to run user events. (a windows-only example of what that means is the canonical Peek/Translate/Dispatch loop) // hopefully this won't actually advance the emulation state in any non-user-input-driven way when called in this context... - CoreTiming::Advance(); + CoreTiming::Advance(); return 0; } @@ -1167,7 +1167,7 @@ void LuaRescueHook(lua_State* L, lua_Debug *dbg) { //lua_sethook(L, NULL, 0, 0); assert(L->errfunc || L->errorJmp); - luaL_error(L, info.panic ? info.panicMessage : "terminated by user"); + luaL_error(L, info.panic ? info.panicMessage : "terminated by user"); } info.panic = false; @@ -1382,7 +1382,7 @@ DEFINE_LUA_FUNCTION(emulua_frameadvance, "") if(info.speedMode == SPEEDMODE_MAXIMUM) CPluginManager::GetInstance().GetVideo()->Video_SetRendering(true); Frame::SetFrameStopping(false); - *PowerPC::GetStatePtr() = PowerPC::CPU_RUNNING; + *PowerPC::GetStatePtr() = PowerPC::CPU_RUNNING; return 0; } @@ -1410,7 +1410,7 @@ DEFINE_LUA_FUNCTION(emulua_redraw, "") DEFINE_LUA_FUNCTION(memory_readbyte, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned char value = Memory::Read_U8(address); lua_settop(L,0); lua_pushinteger(L, value); @@ -1418,7 +1418,7 @@ DEFINE_LUA_FUNCTION(memory_readbyte, "address") } DEFINE_LUA_FUNCTION(memory_readbytesigned, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); signed char value = (signed char)(Memory::Read_U8(address)); lua_settop(L,0); lua_pushinteger(L, value); @@ -1426,7 +1426,7 @@ DEFINE_LUA_FUNCTION(memory_readbytesigned, "address") } DEFINE_LUA_FUNCTION(memory_readword, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned short value = Memory::Read_U16(address); lua_settop(L,0); lua_pushinteger(L, value); @@ -1434,7 +1434,7 @@ DEFINE_LUA_FUNCTION(memory_readword, "address") } DEFINE_LUA_FUNCTION(memory_readwordsigned, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); signed short value = (signed short)(Memory::Read_U16(address)); lua_settop(L,0); lua_pushinteger(L, value); @@ -1442,7 +1442,7 @@ DEFINE_LUA_FUNCTION(memory_readwordsigned, "address") } DEFINE_LUA_FUNCTION(memory_readdword, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned long value = Memory::Read_U32(address); lua_settop(L,0); lua_pushinteger(L, value); @@ -1450,7 +1450,7 @@ DEFINE_LUA_FUNCTION(memory_readdword, "address") } DEFINE_LUA_FUNCTION(memory_readdwordsigned, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); signed long value = (signed long)(Memory::Read_U32(address)); lua_settop(L,0); lua_pushinteger(L, value); @@ -1458,7 +1458,7 @@ DEFINE_LUA_FUNCTION(memory_readdwordsigned, "address") } DEFINE_LUA_FUNCTION(memory_readqword, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned long long value = Memory::Read_U64(address); lua_settop(L,0); lua_pushinteger(L, (lua_Integer)value); @@ -1466,7 +1466,7 @@ DEFINE_LUA_FUNCTION(memory_readqword, "address") } DEFINE_LUA_FUNCTION(memory_readqwordsigned, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); signed long long value = (signed long long)(Memory::Read_U64(address)); lua_settop(L,0); lua_pushinteger(L, (lua_Integer)value); @@ -1475,28 +1475,28 @@ DEFINE_LUA_FUNCTION(memory_readqwordsigned, "address") DEFINE_LUA_FUNCTION(memory_writebyte, "address,value") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned char value = (unsigned char)(luaL_checkinteger(L,2) & 0xFF); Memory::Write_U8(value, address); return 0; } DEFINE_LUA_FUNCTION(memory_writeword, "address,value") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned short value = (unsigned short)(luaL_checkinteger(L,2) & 0xFFFF); Memory::Write_U16(value, address); return 0; } DEFINE_LUA_FUNCTION(memory_writedword, "address,value") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned long value = (unsigned long)(luaL_checkinteger(L,2)); Memory::Write_U32(value, address); return 0; } DEFINE_LUA_FUNCTION(memory_writeqword, "address,value") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); unsigned long value = (unsigned long)(luaL_checkinteger(L,2)); Memory::Write_U64(value, address); return 0; @@ -1504,7 +1504,7 @@ DEFINE_LUA_FUNCTION(memory_writeqword, "address,value") DEFINE_LUA_FUNCTION(memory_readbyterange, "address,length") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); int length = (int)luaL_checkinteger(L,2); if(length < 0) @@ -1533,7 +1533,7 @@ DEFINE_LUA_FUNCTION(memory_readbyterange, "address,length") DEFINE_LUA_FUNCTION(memory_isvalid, "address") { - unsigned long address = luaL_checkinteger(L,1); + unsigned long address = luaL_checkinteger(L,1); lua_settop(L,0); lua_pushboolean(L, Memory::IsRAMAddress(address)); return 1; @@ -2790,7 +2790,7 @@ DEFINE_LUA_FUNCTION(emulua_loadrom, "filename") // Load game specific settings IniFile game_ini; std::string unique_id = StartUp.GetUniqueID(); - StartUp.m_strGameIni = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + unique_id + ".ini"; + StartUp.m_strGameIni = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + unique_id + ".ini"; if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str())) { // General settings diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_FloatingPoint.cpp index 1c6ecb5ffd..e996843510 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_FloatingPoint.cpp @@ -141,4 +141,4 @@ void JitIL::fsign(UGeckoInstruction inst) PanicAlert("fsign bleh"); break; } -} \ No newline at end of file +} diff --git a/Source/Core/Core/Src/PowerPC/LUT_frsqrtex.h b/Source/Core/Core/Src/PowerPC/LUT_frsqrtex.h index 6f925eb2f1..98784904de 100644 --- a/Source/Core/Core/Src/PowerPC/LUT_frsqrtex.h +++ b/Source/Core/Core/Src/PowerPC/LUT_frsqrtex.h @@ -22,4 +22,4 @@ extern const unsigned int frsqrtex_lut[65536]; -#endif //_LUT_frsqrtex_h_ \ No newline at end of file +#endif //_LUT_frsqrtex_h_ diff --git a/Source/Core/Core/Src/stdafx.cpp b/Source/Core/Core/Src/stdafx.cpp index 168ca738eb..31f734b17a 100644 --- a/Source/Core/Core/Src/stdafx.cpp +++ b/Source/Core/Core/Src/stdafx.cpp @@ -15,4 +15,4 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" \ No newline at end of file +#include "stdafx.h" diff --git a/Source/Core/DSPCore/Src/SConscript b/Source/Core/DSPCore/Src/SConscript index 61b7016bb7..1c091cb5c7 100644 --- a/Source/Core/DSPCore/Src/SConscript +++ b/Source/Core/DSPCore/Src/SConscript @@ -30,6 +30,5 @@ files = [ ] acenv = env.Clone() -acenv.Append(CXXFLAGS = [ '-fPIC' ]) acenv.StaticLibrary(env['local_libs'] + 'dspcore', files, LIBS = [ 'common'] ) diff --git a/Source/Core/DebuggerUICommon/Src/SConscript b/Source/Core/DebuggerUICommon/Src/SConscript index 713378cc64..7a51306111 100644 --- a/Source/Core/DebuggerUICommon/Src/SConscript +++ b/Source/Core/DebuggerUICommon/Src/SConscript @@ -13,6 +13,5 @@ files = [ ] acenv = env.Clone() -acenv.Append(CXXFLAGS = [ '-fPIC' ]) acenv.StaticLibrary(env['local_libs'] + 'debugger_ui_util', files) diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp index 132e76c65c..42a417fe2e 100644 --- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp @@ -21,8 +21,6 @@ #ifndef _WIN32 #include -#else - #endif #include "Common.h" diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index 4d2dad502c..68ab32d212 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -238,8 +238,8 @@ ControlState ControllerInterface::InputReference::State( const ControlState igno if ( NULL == device ) return 0; - ControlState state; - // this mode thing will be turned into a switch statement + ControlState state = 0; + switch ( mode ) { // OR diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h b/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h index 961e9ad795..e737bcbfa8 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h @@ -171,4 +171,5 @@ { kHIDUsage_KeyboardRightShift, "Right Shift" }, { kHIDUsage_KeyboardRightAlt, "Right Alt" }, { kHIDUsage_KeyboardRightGUI, "Right GUI" }, -/* 0x4E - 0xFFFF Reserved */ \ No newline at end of file +/* 0x4E - 0xFFFF Reserved */ + diff --git a/Source/Core/InputCommon/Src/SConscript b/Source/Core/InputCommon/Src/SConscript index 8530d6a32a..d80a43f3c3 100644 --- a/Source/Core/InputCommon/Src/SConscript +++ b/Source/Core/InputCommon/Src/SConscript @@ -39,5 +39,4 @@ if sys.platform == 'linux2': 'ControllerInterface/Xlib/Xlib.cpp' ] -icenv.Append(CXXFLAGS = [ '-fPIC' ]) icenv.StaticLibrary(env['local_libs'] + "inputcommon", files) diff --git a/Source/Core/InputCommon/Src/XInput_Util.cpp b/Source/Core/InputCommon/Src/XInput_Util.cpp index e022c2d96a..0e9d6f4b24 100644 --- a/Source/Core/InputCommon/Src/XInput_Util.cpp +++ b/Source/Core/InputCommon/Src/XInput_Util.cpp @@ -121,4 +121,4 @@ bool IsConnected(int Controller) } // XInput -#endif \ No newline at end of file +#endif diff --git a/Source/Core/VideoCommon/Src/SConscript b/Source/Core/VideoCommon/Src/SConscript index fa69db1c4f..fad8b16953 100644 --- a/Source/Core/VideoCommon/Src/SConscript +++ b/Source/Core/VideoCommon/Src/SConscript @@ -45,5 +45,4 @@ if env_vcommon['HAVE_OPENCL']: 'OpenCL/OCLTextureDecoder.cpp', ] -env_vcommon.Append(CXXFLAGS = [ '-fPIC' ]) env_vcommon.StaticLibrary(env['local_libs'] + "videocommon", files) diff --git a/Source/DSPTool/Src/SConscript b/Source/DSPTool/Src/SConscript index 068542db93..7e0456fb37 100644 --- a/Source/DSPTool/Src/SConscript +++ b/Source/DSPTool/Src/SConscript @@ -15,8 +15,7 @@ libs = [ ] -dtenv.Append(CXXFLAGS = [ '-fPIC' ], - LIBS = libs) +dtenv.Append(LIBS = libs) if sys.platform == 'darwin': dtenv['FRAMEWORKS'] = ['CoreFoundation', 'Cocoa', 'System'] diff --git a/Source/Plugins/InputPluginCommon/Src/SConscript b/Source/Plugins/InputPluginCommon/Src/SConscript index 1bdf26a744..54bd044d8f 100644 --- a/Source/Plugins/InputPluginCommon/Src/SConscript +++ b/Source/Plugins/InputPluginCommon/Src/SConscript @@ -17,5 +17,4 @@ if env['HAVE_WX']: env_inputpc = env.Clone() -env_inputpc.Append(CXXFLAGS = [ '-fPIC' ]) env_inputpc.StaticLibrary(env['local_libs'] + "inputplugincommon", files) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp index 5ed5c47163..a879ace92b 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp @@ -46,4 +46,4 @@ void CConfig::Save() ac_Config.Set(file); file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str()); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp index 7666c43cfe..248b7b0436 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp @@ -79,11 +79,11 @@ void CMailHandler::DoState(PointerWrap &p) if (p.GetMode() == PointerWrap::MODE_READ) { Clear(); - int sz; + int sz = 0; p.Do(sz); for (int i = 0; i < sz; i++) { - u32 mail; + u32 mail = 0; p.Do(mail); m_Mails.push(mail); } diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/SConscript b/Source/Plugins/Plugin_DSP_HLE/Src/SConscript index 75eea46cdd..6647ecc877 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_HLE/Src/SConscript @@ -31,7 +31,6 @@ if dspenv['HAVE_WX']: ] dspenv.Append( - CXXFLAGS = [ '-fPIC' ], LIBS = [ 'common', 'audiocommon' ], ) if sys.platform == 'darwin': diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/SConscript b/Source/Plugins/Plugin_DSP_LLE/Src/SConscript index bf3cd4cb20..ed92c4192e 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_LLE/Src/SConscript @@ -26,12 +26,10 @@ if env['HAVE_WX']: lleenv = env.Clone() if env['HAVE_WX']: lleenv.Append( - CXXFLAGS = [ '-fPIC' ], LIBS = [ 'dspcore', 'audiocommon', 'common', 'debugger_ui_util' ], ) else: lleenv.Append( - CXXFLAGS = [ '-fPIC' ], LIBS = [ 'dspcore', 'audiocommon', 'common' ], ) if sys.platform == 'darwin': diff --git a/Source/Plugins/Plugin_GCPad/Src/ReRecording.cpp b/Source/Plugins/Plugin_GCPad/Src/ReRecording.cpp index 6abea920b0..19f5044815 100644 --- a/Source/Plugins/Plugin_GCPad/Src/ReRecording.cpp +++ b/Source/Plugins/Plugin_GCPad/Src/ReRecording.cpp @@ -178,4 +178,4 @@ void DoState(unsigned char **ptr, int mode) } // Recording -#endif // RERECORDING \ No newline at end of file +#endif // RERECORDING diff --git a/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp b/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp index ce4b6a9d91..f00e8a120a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp @@ -151,4 +151,4 @@ void SetInterlacingMode(const BPCmd &bp) // TODO } -}; \ No newline at end of file +}; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h index 8a034e819e..1a1550d3e3 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h @@ -140,4 +140,4 @@ int GetNumAdapters(); } // namespace -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h index 4354f0965c..d6de8e4ed4 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h @@ -31,4 +31,4 @@ namespace D3D // Utility functions LPDIRECT3DVERTEXSHADER9 CompileAndCreateVertexShader(const char *code, int len); LPDIRECT3DPIXELSHADER9 CompileAndCreatePixelShader(const char *code, int len); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.cpp index e7bcd96570..5d81be3b6b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.cpp @@ -465,4 +465,4 @@ void DListCache::Cleanup() SETSTAT(stats.numDListsAlive,(int)dlists.size()); } -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h b/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h index 68e371a65a..4aa0a00438 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h @@ -69,4 +69,4 @@ public: static void Call(u32 _addr, u32 _size); }; -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h index 894f893a85..7cab183ad2 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h @@ -17,4 +17,4 @@ #pragma once -void DlgSettings_Show(HINSTANCE hInstance, HWND parent); \ No newline at end of file +void DlgSettings_Show(HINSTANCE hInstance, HWND parent); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp index b182cf450e..5a7248bd4d 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp @@ -519,4 +519,4 @@ const XFBSource** FramebufferManager::getVirtualXFBSource(u32 xfbAddr, u32 fbWid } return &m_overlappingXFBArray[0]; -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Globals.h b/Source/Plugins/Plugin_VideoDX9/Src/Globals.h index e2a0df8c4c..0b7296801a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Globals.h @@ -28,4 +28,4 @@ // A global plugin specification extern PLUGIN_GLOBALS* globals; -#endif // _GLOBALS_H_ \ No newline at end of file +#endif // _GLOBALS_H_ diff --git a/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp index f3cea8e60a..f584066ac0 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp @@ -170,4 +170,4 @@ void D3DVertexFormat::SetupVertexPointers() const D3D::SetVertexDeclaration(d3d_decl); else ERROR_LOG(VIDEO, "invalid d3d decl"); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/RGBAFloat.h b/Source/Plugins/Plugin_VideoDX9/Src/RGBAFloat.h index 7226d472d7..9100660a28 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/RGBAFloat.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/RGBAFloat.h @@ -81,4 +81,4 @@ struct RGBAFloat } }; -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h index 649533dbcc..317b689326 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h @@ -86,4 +86,4 @@ public: static void CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle &source_rect); }; -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.cpp b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.cpp index 6f66de795d..42f48cad34 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.cpp @@ -145,4 +145,4 @@ namespace W32Util { Write(&i,sizeof(char)); } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.h b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.h index 0f401b76a2..1c71e66002 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/File.h @@ -58,4 +58,4 @@ namespace W32Util } -#endif //__LAMEFILE_H__ \ No newline at end of file +#endif //__LAMEFILE_H__ diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.cpp b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.cpp index 254c552767..45855382b1 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.cpp @@ -99,4 +99,4 @@ namespace W32Util CloseClipboard(); return TRUE; } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.h b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.h index a5a86a12bf..4a1f9b9d3c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Misc.h @@ -6,4 +6,4 @@ namespace W32Util HBITMAP CreateBitmapFromARGB(HWND someHwnd, DWORD *image, int w, int h); void NiceSizeFormat(size_t size, char * out); BOOL CopyTextToClipboard(HWND hwnd, char * text); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.cpp b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.cpp index a3f493c123..3e2d38d4b3 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.cpp @@ -224,4 +224,4 @@ namespace W32Util } return 0; } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.h b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.h index de51d10abb..b0422530b8 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/PropertySheet.h @@ -84,4 +84,4 @@ namespace W32Util -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/ShellUtil.h b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/ShellUtil.h index f952923068..bf79a53c46 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/ShellUtil.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/ShellUtil.h @@ -12,4 +12,4 @@ namespace W32Util std::string& _strFileName); std::vector BrowseForFileNameMultiSelect(bool _bLoad, HWND _hParent, const char *_pTitle, const char *_pInitialFolder,const char *_pFilter,const char *_pExtension); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Thread.cpp b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Thread.cpp index 51177f9c18..3aafc3d17a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Thread.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/W32Util/Thread.cpp @@ -79,4 +79,4 @@ namespace W32Util if (_handle != NULL) SuspendThread(_handle); } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h b/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h index c3f61c37a0..b183ff9eb0 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h @@ -27,4 +27,4 @@ void XFUpdatePJ(); void LoadXFReg(u32 transferSize, u32 address, u32 *pData); void LoadIndexedXF(u32 val, int array); -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/bmp_io.h b/Source/Plugins/Plugin_VideoDX9/Src/bmp_io.h index 48d53b2190..bcc88459d9 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/bmp_io.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/bmp_io.h @@ -24,4 +24,4 @@ int write_u_long_int ( unsigned long int u_long_int_val, FILE *fileout ); int write_u_short_int ( unsigned short int u_short_int_val, FILE *fileout ); -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp b/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp index 168ca738eb..31f734b17a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp @@ -15,4 +15,4 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" \ No newline at end of file +#include "stdafx.h" diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 959cbd52f2..4793e4b994 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -25,8 +25,7 @@ files = [ 'PostProcessing.cpp', 'FramebufferManager.cpp', ] -compileFlags = [ - '-fPIC', +compileFlags = [ ] linkFlags = [ ] diff --git a/Source/Plugins/Plugin_VideoOGL/Src/stdafx.cpp b/Source/Plugins/Plugin_VideoOGL/Src/stdafx.cpp index 168ca738eb..31f734b17a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/stdafx.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/stdafx.cpp @@ -15,4 +15,4 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" \ No newline at end of file +#include "stdafx.h" diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp index 5842bf8210..d7ddac4f2a 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp @@ -226,7 +226,7 @@ inline void CalculateLOD(s32 &lod, bool &linear, u32 texmap, u32 texcoord) bias >>= 1; lod += bias; - linear = (lod > 0 && (tm0.min_filter & 4) || lod <= 0 && tm0.mag_filter); + linear = ((lod > 0 && (tm0.min_filter & 4)) || (lod <= 0 && tm0.mag_filter)); // order of checks matters // should be: diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SConscript b/Source/Plugins/Plugin_VideoSoftware/Src/SConscript index 7077459a16..6732a13b0f 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SConscript +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SConscript @@ -36,9 +36,6 @@ files = [ 'VideoConfig.cpp', 'XFMemLoader.cpp', ] -compileFlags = [ - '-fPIC', - ] linkFlags = [ ] libs = [ @@ -56,7 +53,7 @@ conf = gfxenv.Configure(custom_tests = tests, if sys.platform == 'darwin': gfxenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'OpenGL', 'Cocoa', 'Cg'] - compileFlags += ['-x','objective-c++',] + compileFlags = ['-x','objective-c++',] files += [ 'cocoaGL.m', ] conf.CheckPKG('OpenGL') @@ -94,7 +91,6 @@ if gfxenv['USE_WX'] and not gfxenv['HAVE_WX']: print "Must have wx to use wxgl" Return() gfxenv.Append( - CXXFLAGS = compileFlags, LINKFLAGS = linkFlags, ) diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/stdafx.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/stdafx.cpp index e99bf631a9..7ab8deaa0c 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/stdafx.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/stdafx.cpp @@ -15,4 +15,4 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "stdafx.h" \ No newline at end of file +#include "stdafx.h" diff --git a/Source/Plugins/Plugin_Wiimote/Src/SConscript b/Source/Plugins/Plugin_Wiimote/Src/SConscript index 49664cf3be..ddb71e9249 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/SConscript +++ b/Source/Plugins/Plugin_Wiimote/Src/SConscript @@ -30,8 +30,7 @@ if wmenv['HAVE_WX']: ] libs = [ 'common', 'inputcommon' ] - -cxxflags = [ '-fPIC' ] +cxxflags = [ ] if wmenv['HAVE_WIIUSE']: libs += [ 'wiiuse' ] diff --git a/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.h b/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.h index 476860ba47..9e5d7ff8ff 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.h +++ b/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.h @@ -41,4 +41,4 @@ private: int err; static int noinst; }; -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp index bfd3cf94b6..c0e217ca96 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp @@ -63,7 +63,7 @@ wiimote_t** g_WiiMotesFromWiiUse = NULL; Common::Thread* g_pReadThread = NULL; int g_NumberOfWiiMotes; CWiiMote* g_WiiMotes[MAX_WIIMOTES]; -bool g_Shutdown = false; +volatile bool g_Shutdown = false; Common::Event g_StartThread; Common::Event g_StopThreadTemporary; bool g_LocalThread = true; diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp index 6a2bfeea1e..05c1e8fbe1 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp @@ -193,4 +193,4 @@ void DoState(unsigned char **ptr, int mode) } // Recording -#endif // RERECORDING \ No newline at end of file +#endif // RERECORDING diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript b/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript index a1d90f68c2..764f3af1ef 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/SConscript @@ -1,31 +1,30 @@ -# -*- python -*- - -Import('env') -import sys - -name = "Plugin_nJoy_SDL" -padenv = env.Clone() - -if not env['HAVE_SDL']: - print name + " must have SDL to be build" - Return() - -files = [ - 'Config.cpp', - 'nJoy.cpp', - 'Rumble.cpp', - ] -if padenv['HAVE_WX']: - files += [ - 'GUI/AboutBox.cpp', - 'GUI/ConfigAdvanced.cpp', - 'GUI/ConfigJoypad.cpp', - 'GUI/ConfigBox.cpp', - ] - -padenv.Append( - CXXFLAGS = [ '-fPIC' ], - LIBS = [ 'common', 'inputcommon' ], - ) - -padenv.SharedLibrary(env['plugin_dir']+name, files) +# -*- python -*- + +Import('env') +import sys + +name = "Plugin_nJoy_SDL" +padenv = env.Clone() + +if not env['HAVE_SDL']: + print name + " must have SDL to be build" + Return() + +files = [ + 'Config.cpp', + 'nJoy.cpp', + 'Rumble.cpp', + ] +if padenv['HAVE_WX']: + files += [ + 'GUI/AboutBox.cpp', + 'GUI/ConfigAdvanced.cpp', + 'GUI/ConfigJoypad.cpp', + 'GUI/ConfigBox.cpp', + ] + +padenv.Append( + LIBS = [ 'common', 'inputcommon' ], + ) + +padenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/TestSuite/ASM/source/Defines.h b/Source/TestSuite/ASM/source/Defines.h index 1a0e065243..0bfe36f498 100644 --- a/Source/TestSuite/ASM/source/Defines.h +++ b/Source/TestSuite/ASM/source/Defines.h @@ -5,4 +5,4 @@ #define u8 unsigned char #define s8 signed char #define s16 signed short -#define s32 signed int \ No newline at end of file +#define s32 signed int diff --git a/Source/TestSuite/ASM/source/Helpers.cpp b/Source/TestSuite/ASM/source/Helpers.cpp index 423ba296ee..9aad445846 100644 --- a/Source/TestSuite/ASM/source/Helpers.cpp +++ b/Source/TestSuite/ASM/source/Helpers.cpp @@ -56,4 +56,4 @@ u32 GetXER() : "=&r"(var) ); return var; -} \ No newline at end of file +} diff --git a/Source/TestSuite/ASM/source/Helpers.h b/Source/TestSuite/ASM/source/Helpers.h index bd7f9830fe..721f33adff 100644 --- a/Source/TestSuite/ASM/source/Helpers.h +++ b/Source/TestSuite/ASM/source/Helpers.h @@ -2,4 +2,4 @@ u32 GetCR0(); u32 GetCR(u32 num); -u32 GetXER(); \ No newline at end of file +u32 GetXER(); diff --git a/Source/TestSuite/ASM/source/Instructions.h b/Source/TestSuite/ASM/source/Instructions.h index e4eb8374b0..d8f8206574 100644 --- a/Source/TestSuite/ASM/source/Instructions.h +++ b/Source/TestSuite/ASM/source/Instructions.h @@ -17,4 +17,4 @@ void divwoRC(u32 *a, u32 *b, u32 *c, u32 *d); void fsqrt(float *a, float *b, float *c, float *d); -void fsqrtRC(float *a, float *b, float *c, float *d); \ No newline at end of file +void fsqrtRC(float *a, float *b, float *c, float *d); diff --git a/Source/TestSuite/ASM/source/asm_float.cpp b/Source/TestSuite/ASM/source/asm_float.cpp index c38a0dad97..89693eaf8f 100644 --- a/Source/TestSuite/ASM/source/asm_float.cpp +++ b/Source/TestSuite/ASM/source/asm_float.cpp @@ -13,4 +13,4 @@ void fsqrtRC(float *a, float *b, float *c, float *d) "fsqrt. fr0,%0" : "=&r"(*a) );*/ -} \ No newline at end of file +} diff --git a/Source/TestSuite/ASM/source/asm_integer.cpp b/Source/TestSuite/ASM/source/asm_integer.cpp index ed81832a5b..65f01c0c67 100644 --- a/Source/TestSuite/ASM/source/asm_integer.cpp +++ b/Source/TestSuite/ASM/source/asm_integer.cpp @@ -71,4 +71,4 @@ void divwoRC(u32 *a, u32 *b, u32 *c, u32 *d) : "r"(*b), "r"(*c) : "cc" ); -} \ No newline at end of file +} diff --git a/Source/TestSuite/ASM/source/asm_tables.cpp b/Source/TestSuite/ASM/source/asm_tables.cpp index d04cfe24b2..6f3c1accef 100644 --- a/Source/TestSuite/ASM/source/asm_tables.cpp +++ b/Source/TestSuite/ASM/source/asm_tables.cpp @@ -185,4 +185,4 @@ void RunInstruction(u32 inst) } if(f) fclose(f); -} \ No newline at end of file +} diff --git a/Source/TestSuite/ASM/source/asm_tables.h b/Source/TestSuite/ASM/source/asm_tables.h index 1c8e35ba53..1f47a4c406 100644 --- a/Source/TestSuite/ASM/source/asm_tables.h +++ b/Source/TestSuite/ASM/source/asm_tables.h @@ -49,4 +49,4 @@ static inst instructions[] = { }; -void RunInstruction(u32 inst); \ No newline at end of file +void RunInstruction(u32 inst); diff --git a/Source/TestSuite/ASM/source/dolphintest_asm.cpp b/Source/TestSuite/ASM/source/dolphintest_asm.cpp index f0171ca395..13c6af49f3 100644 --- a/Source/TestSuite/ASM/source/dolphintest_asm.cpp +++ b/Source/TestSuite/ASM/source/dolphintest_asm.cpp @@ -25,17 +25,6 @@ #include "asm_tables.h" #include "Helpers.h" -#ifdef __APPLE__ -void die(char *msg){} - -void initialise_fat(){} - -void init_crap(){} - -void end(){} -#endif - - FILE *f = NULL; int main(int argc, char **argv) { init_crap(); diff --git a/Source/TestSuite/ASM/source/makefile b/Source/TestSuite/ASM/source/makefile index e55275a9fe..240eb6d1e8 100644 --- a/Source/TestSuite/ASM/source/makefile +++ b/Source/TestSuite/ASM/source/makefile @@ -1,2 +1,2 @@ all: - g++ -g -arch ppc dolphintest_asm.cpp asm_tables.cpp Helpers.cpp asm_integer.cpp asm_float.cpp -o Test \ No newline at end of file + g++ -g -arch ppc dolphintest_asm.cpp asm_tables.cpp Helpers.cpp asm_integer.cpp asm_float.cpp -o Test diff --git a/Source/UnitTests/DSPJitTester.h b/Source/UnitTests/DSPJitTester.h index 459a137a7c..680140e92b 100644 --- a/Source/UnitTests/DSPJitTester.h +++ b/Source/UnitTests/DSPJitTester.h @@ -112,4 +112,4 @@ public: static void Initialize(); }; -#endif \ No newline at end of file +#endif