mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
CMake: Add -Wall for debug builds
This commit is contained in:
+3
-3
@@ -3,7 +3,7 @@ add_library(src_lib STATIC
|
||||
hankaku.c
|
||||
utfsjis.c
|
||||
)
|
||||
target_compile_options(src_lib PRIVATE -Wno-pointer-sign)
|
||||
target_compile_options(src_lib PRIVATE -Wno-pointer-sign -Wall)
|
||||
target_include_directories(src_lib PRIVATE .)
|
||||
|
||||
if (ANDROID)
|
||||
@@ -12,7 +12,7 @@ else()
|
||||
add_executable(xsystem35)
|
||||
endif()
|
||||
|
||||
target_compile_options(xsystem35 PRIVATE -Wno-pointer-sign)
|
||||
target_compile_options(xsystem35 PRIVATE -Wno-pointer-sign $<$<CONFIG:Debug>:-Wall>)
|
||||
target_include_directories(xsystem35 PRIVATE .)
|
||||
target_link_libraries(xsystem35 PRIVATE src_lib)
|
||||
|
||||
@@ -118,7 +118,7 @@ else() # non-emscripten, non-android
|
||||
gameresource_test.c
|
||||
hankaku_test.c
|
||||
)
|
||||
target_compile_options(src_tests PRIVATE -Wno-pointer-sign)
|
||||
target_compile_options(src_tests PRIVATE -Wno-pointer-sign -Wall)
|
||||
target_link_libraries(src_tests PRIVATE src_lib)
|
||||
add_test(NAME src_tests COMMAND src_tests)
|
||||
configure_file(testdata/test.gr ${CMAKE_CURRENT_BINARY_DIR}/testdata/test.gr COPYONLY)
|
||||
|
||||
@@ -620,12 +620,11 @@ void ags_alpha_getPixel(int x, int y, int *pic) {
|
||||
}
|
||||
|
||||
void ags_alpha_setPixel(int x, int y, int w, int h, BYTE *b) {
|
||||
int savex, savey, savew, saveh, offset;
|
||||
int savex, savey, savew, offset;
|
||||
|
||||
savex = x;
|
||||
savey = y;
|
||||
savew = w;
|
||||
saveh = h;
|
||||
|
||||
if (!check_param(&x, &y, &w, &h)) return;
|
||||
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ static int cdrom_start(int trk, int loop) {
|
||||
return OK;
|
||||
} else {
|
||||
ti.cdti_trk0 = ti.cdti_trk1 = trk;
|
||||
ti.cdti_ind0 = ti.cdti_ind0 = 0;
|
||||
ti.cdti_ind0 = ti.cdti_ind1 = 0;
|
||||
if (do_ioctl(CDROMPLAYTRKIND, &ti) < 0) {
|
||||
perror("CDROMPLAYTRKIND");
|
||||
return NG;
|
||||
|
||||
@@ -500,6 +500,8 @@ void commands2F2A() {
|
||||
sysVar[0] = save_save_str_with_file(fname_utf8, _var, cnt);
|
||||
break;
|
||||
default:
|
||||
_var = getCaliValue();
|
||||
cnt = getCaliValue();
|
||||
WARNING("Unknown QE command\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ typedef void *entrypoint (void);
|
||||
void commands2F60() {
|
||||
int type = sys_getdw(); /* DLL type */
|
||||
int fnum = sys_getdw(); /* function number */
|
||||
entrypoint *function = NULL;
|
||||
|
||||
#ifdef ENABLE_MODULES
|
||||
if (dll == NULL) {
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#include "selection.h"
|
||||
|
||||
/* 選択肢Window情報 */
|
||||
Bcom_WindowInfo selWinInfo[SELWINMAX] = {{ 464, 80, 160, 160, TRUE}, 0};
|
||||
Bcom_WindowInfo selWinInfo[SELWINMAX] = {{ 464, 80, 160, 160, TRUE }};
|
||||
/* 現在の選択肢Window番号 */
|
||||
static int selWinNo;
|
||||
/* 現在のMessageWindow番号 */
|
||||
|
||||
@@ -125,6 +125,8 @@ void commandLE() {
|
||||
sysVar[0] = save_load_str_with_file(fname_utf8, _var, num);
|
||||
break;
|
||||
default:
|
||||
_var = getCaliValue();
|
||||
num = getCaliValue();
|
||||
WARNING("Unknown LE command %d\n", type);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -364,8 +364,6 @@ void commandMN() {
|
||||
int no = sys_getc();
|
||||
int num = getCaliValue();
|
||||
int *var = getCaliVariable();
|
||||
int i, len;
|
||||
const char *b;
|
||||
|
||||
switch(no) {
|
||||
case 0:
|
||||
|
||||
@@ -100,6 +100,8 @@ void commandQE() {
|
||||
sysVar[0] = save_save_str_with_file(fname_utf8, _var, cnt);
|
||||
break;
|
||||
default:
|
||||
_var = getCaliValue();
|
||||
cnt = getCaliValue();
|
||||
WARNING("Unknown QE command %d\n", type);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ static void sdl_drawAntiAlias_8bpp(int dstx, int dsty, SDL_Surface *src, unsigne
|
||||
int font_draw_glyph(int x, int y, const char *str_utf8, int cl) {
|
||||
SDL_Surface *fs;
|
||||
SDL_Rect r_src, r_dst;
|
||||
int w, h, maxy;
|
||||
int w, h;
|
||||
|
||||
if (!*str_utf8)
|
||||
return 0;
|
||||
|
||||
@@ -163,7 +163,6 @@ static int checkMessage() {
|
||||
|
||||
void nact_main() {
|
||||
reset_counter_high(SYSTEMCOUNTER_MSEC, 1, 0);
|
||||
int cnt = 0;
|
||||
|
||||
nact->frame_count = 0;
|
||||
nact->cmd_count = 0;
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ int s39ain_init(void) {
|
||||
long len;
|
||||
char *buf;
|
||||
unsigned char *p;
|
||||
int i, errors = 0;
|
||||
int i;
|
||||
|
||||
if (path_to_ain == NULL) {
|
||||
return NG;
|
||||
|
||||
+1
-2
@@ -41,7 +41,6 @@
|
||||
/* static mathods */
|
||||
static void popVars(int *tmp);
|
||||
static void popDatas(int *tmp);
|
||||
static void showStackInfo();
|
||||
static void sl_push(int type, int *val, int cnt);
|
||||
static int* sl_pop();
|
||||
|
||||
@@ -62,6 +61,7 @@ static int dataPushCnt = 0;
|
||||
/* driobject */
|
||||
static dridata *dfile;
|
||||
|
||||
#if 0
|
||||
/* debug: show stack information */
|
||||
static void showStackInfo() {
|
||||
DEBUG_MESSAGE("stack top = %p, cur = %p, size=%d\n", sco_stackbuf, sco_stackindex, sco_stacksize);
|
||||
@@ -72,7 +72,6 @@ static void showIndexInfo() {
|
||||
DEBUG_MESSAGE("page = %d, index = %x\n", sl_page, sl_index);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void showStackData() {
|
||||
int i, j;
|
||||
int *var;
|
||||
|
||||
+3
-3
@@ -447,7 +447,6 @@ static void registerGameFiles(void) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
char *homedir = getenv("HOME"), *rc_name, *rc_path;
|
||||
#ifdef HAVE_SIGACTION
|
||||
sys_set_signalhandler(SIGINT, SIG_IGN);
|
||||
#endif
|
||||
@@ -507,11 +506,12 @@ int main(int argc, char **argv) {
|
||||
sys35_init();
|
||||
|
||||
#ifdef ENABLE_GTK
|
||||
rc_name = get_profile("gtkrc_path");
|
||||
char *homedir = getenv("HOME");
|
||||
char *rc_name = get_profile("gtkrc_path");
|
||||
if (!rc_name) {
|
||||
rc_name = GTK_RC_NAME;
|
||||
}
|
||||
rc_path = (char *)malloc(sizeof(char) * (strlen(homedir) + strlen(rc_name)) + 2);
|
||||
char *rc_path = (char *)malloc(sizeof(char) * (strlen(homedir) + strlen(rc_name)) + 2);
|
||||
strcpy(rc_path, homedir);
|
||||
strcat(rc_path, "/");
|
||||
strcat(rc_path, rc_name);
|
||||
|
||||
Reference in New Issue
Block a user