From c1d97fc72abac1bcb2fde8a6d0adb7f945c3b3a7 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:58:01 +0500 Subject: [PATCH] Fix some more remaining warnings --- src/codegen/codegen_ops_x86-64.h | 2 +- src/codegen_new/codegen_backend_x86-64_ops.c | 4 ++-- src/win/win_devconf.c | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/codegen/codegen_ops_x86-64.h b/src/codegen/codegen_ops_x86-64.h index 8f38b6b90..9184b4bff 100644 --- a/src/codegen/codegen_ops_x86-64.h +++ b/src/codegen/codegen_ops_x86-64.h @@ -28,7 +28,7 @@ static inline void call(codeblock_t *block, uintptr_t func) codegen_reg_loaded[0] = codegen_reg_loaded[1] = codegen_reg_loaded[2] = codegen_reg_loaded[3] = 0; codegen_reg_loaded[4] = codegen_reg_loaded[5] = codegen_reg_loaded[6] = codegen_reg_loaded[7] = 0; - if (diff >= -0x80000000 && diff < 0x7fffffff) + if (diff >= -0x80000000LL && diff < 0x7fffffffLL) { addbyte(0xE8); /*CALL*/ addlong((uint32_t)diff); diff --git a/src/codegen_new/codegen_backend_x86-64_ops.c b/src/codegen_new/codegen_backend_x86-64_ops.c index 32739668a..2baa0f585 100644 --- a/src/codegen_new/codegen_backend_x86-64_ops.c +++ b/src/codegen_new/codegen_backend_x86-64_ops.c @@ -32,7 +32,7 @@ static inline void call(codeblock_t *block, uintptr_t func) codegen_alloc_bytes(block, 5); diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]); - if (diff >= -0x80000000 && diff < 0x7fffffff) + if (diff >= -0x80000000LL && diff < 0x7fffffffLL) { codegen_addbyte(block, 0xE8); /*CALL*/ codegen_addlong(block, (uint32_t)diff); @@ -53,7 +53,7 @@ static inline void jmp(codeblock_t *block, uintptr_t func) codegen_alloc_bytes(block, 5); diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]); - if (diff >= -0x80000000 && diff < 0x7fffffff) + if (diff >= -0x80000000LL && diff < 0x7fffffffLL) { codegen_addbyte(block, 0xe9); /*JMP*/ codegen_addlong(block, (uint32_t)diff); diff --git a/src/win/win_devconf.c b/src/win/win_devconf.c index e8c178b91..804762af6 100644 --- a/src/win/win_devconf.c +++ b/src/win/win_devconf.c @@ -45,7 +45,10 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) { HWND h; - int val_int, id, c, d, num; + int val_int, id, c, d; +#ifdef USE_RTMIDI + int num; +#endif int changed, cid; const device_config_t *config; const device_config_selection_t *selection;