Userspace: Compile programs and libraries with -Wall -Wextra -Werror

This commit is contained in:
2024-09-26 15:20:07 +03:00
parent e6ed5a388d
commit cea6dedccc
6 changed files with 8 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ foreach(library ${USERSPACE_LIBRARIES})
# This is to allow cmake to link when libc updates
target_link_options(${library_lower} PRIVATE -nolibc)
# Default compile options
target_compile_options(${library_lower} PRIVATE -g -O2)
target_compile_options(${library_lower} PRIVATE -g -O2 -Wall -Wextra -Werror)
target_compile_definitions(${library_lower} PRIVATE __enable_sse=${BANAN_ENABLE_SSE})
if (NOT BANAN_ENABLE_SSE)

View File

@@ -166,7 +166,7 @@ namespace LibGUI
if (amount <= 0)
return;
const uint32_t copy_src_y = BAN::Math::clamp<int32_t>(src_y, 0, height());
const int32_t copy_src_y = BAN::Math::clamp<int32_t>(src_y, 0, height());
const int32_t copy_amount = BAN::Math::clamp<int32_t>(src_y + amount, 0, height()) - copy_src_y;
if (copy_amount > 0)
{