Remove -Wno-unused and fix resulting errors
Jeffrey Pfau jeffrey@endrift.com
Thu, 02 May 2013 00:35:32 -0700
5 files changed,
8 insertions(+),
10 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6) project(GBAc) -set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -Wno-unused -Werror --std=gnu99") -set(CMAKE_C_FLAGS_RELEASE "-O3 -Wall -Wextra -Wno-unused -Werror --std=gnu99") +set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -Werror --std=gnu99") +set(CMAKE_C_FLAGS_RELEASE "-O3 -Wall -Wextra -Werror --std=gnu99") file(GLOB ARM_SRC ${CMAKE_SOURCE_DIR}/src/arm/*.c) file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c) file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/*.c)
M
src/arm/isa-thumb.c
→
src/arm/isa-thumb.c
@@ -342,6 +342,7 @@
#define DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(NAME, RN, ADDRESS, LOOP, BODY, OP, PRE_BODY, POST_BODY, WRITEBACK) \ DEFINE_INSTRUCTION_THUMB(NAME, \ int rn = RN; \ + UNUSED(rn); \ int rs = opcode & 0xFF; \ int32_t address = ADDRESS; \ int m; \
M
src/gba/gba-memory.c
→
src/gba/gba-memory.c
@@ -435,6 +435,7 @@ int ws1seq = (parameters & 0x0080) >> 7;
int ws2 = (parameters & 0x0300) >> 8; int ws2seq = (parameters & 0x0400) >> 10; int prefetch = parameters & 0x4000; + (void)(prefetch); memory->waitstates16[REGION_CART_SRAM] = GBA_ROM_WAITSTATES[sram]; memory->waitstatesSeq16[REGION_CART_SRAM] = GBA_ROM_WAITSTATES[sram];
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -304,8 +304,6 @@ }
} static void _drawScanline(struct GBAVideoSoftwareRenderer* renderer, int y) { - uint32_t* row = renderer->row; - int i; if (renderer->dispcnt.objEnable) { for (i = 0; i < 128; ++i) {@@ -399,7 +397,7 @@ localY = 7 - (inY & 0x7); \
} #define BACKGROUND_MODE_0_TILE_16_LOOP(TYPE) \ - for (tileX; tileX < 30; ++tileX) { \ + for (; tileX < 30; ++tileX) { \ BACKGROUND_TEXT_SELECT_CHARACTER; \ charBase = ((background->charBase + (mapData.tile << 5)) >> 2) + localY; \ uint32_t tileData = ((uint32_t*)renderer->d.vram)[charBase]; \@@ -446,7 +444,7 @@ } \
} #define BACKGROUND_MODE_0_TILE_256_LOOP(TYPE) \ - for (tileX; tileX < 30; ++tileX) { \ + for (; tileX < 30; ++tileX) { \ BACKGROUND_TEXT_SELECT_CHARACTER; \ charBase = ((background->charBase + (mapData.tile << 6)) >> 2) + (localY << 1); \ if (!mapData.hflip) { \@@ -509,9 +507,7 @@ } \
} static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, struct GBAVideoSoftwareBackground* background, int y) { - int start = renderer->start; - int end = renderer->end; - int inX = start + background->x; + int inX = background->x; int inY = y + background->y; union GBATextMapData mapData;
M
src/main.c
→
src/main.c
@@ -137,7 +137,7 @@ struct timespec ts;
gettimeofday(&tv, 0); ts.tv_sec = tv.tv_sec; ts.tv_nsec = tv.tv_usec * 1000 + 800000; - int err = pthread_cond_timedwait(&renderer->d.upCond, &renderer->d.mutex, &ts); + err = pthread_cond_timedwait(&renderer->d.upCond, &renderer->d.mutex, &ts); if (err == ETIMEDOUT) { break; }