From aff0b28356bf5094bb18dced2ea44ed6738da71c Mon Sep 17 00:00:00 2001 From: Egor00f Date: Thu, 15 Aug 2024 13:28:51 +0200 Subject: [PATCH] Fix sys/ksys.h -Wextra warnings just fix warnings: just added parentheses and fix Wunused-param offset --- contrib/sdk/sources/newlib/libc/include/sys/ksys.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/sdk/sources/newlib/libc/include/sys/ksys.h b/contrib/sdk/sources/newlib/libc/include/sys/ksys.h index 12565de0e7..a9c7281e44 100644 --- a/contrib/sdk/sources/newlib/libc/include/sys/ksys.h +++ b/contrib/sdk/sources/newlib/libc/include/sys/ksys.h @@ -516,7 +516,7 @@ KOSAPI void _ksys_define_button(uint32_t x, uint32_t y, uint32_t w, uint32_t h, KOSAPI void _ksys_delete_button(uint32_t id) { - asm_inline("int $0x40" ::"a"(8), "d"(id & 0x00FFFFFF | 0x80000000)); + asm_inline("int $0x40" ::"a"(8), "d"((id & 0x00FFFFFF) | 0x80000000)); } /*============ Function 9 - information on execution thread. ===========*/ @@ -1223,12 +1223,13 @@ KOSAPI void _ksys_debug_puts(const char* s) KOSAPI void ksys_draw_bitmap_palette(void* bitmap, int x, int y, int w, int h, int bpp, void* palette, int offset) { asm_inline( - "pushl %%ebp\n\t" // save EBP register - "movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param + "pushl %%ebp\n\t" // save EBP register + "movl %0, %%ebp\n\t" // 0x24 - "offset" param "int $0x40\n\t" "popl %%ebp" // restore EBP register - : - : "a"(65), + :: + "X"(offset), + "a"(65), "b"(bitmap), "c"((w << 16) + h), "d"((x << 16) + y), -- 2.45.2