Enable -Werror on Vulkan WSI Layer

This commit is contained in:
Maged Elnaggar 2024-10-22 09:14:54 +00:00 committed by Dennis Tsiang
parent 54e4ff8c66
commit 57fedd8cdb
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ if (NOT CLANG_TIDY STREQUAL "CLANG_TIDY-NOTFOUND")
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY} -checks=bugprone-*,modernize-*)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -pthread -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

View file

@ -55,7 +55,7 @@ VkResult extension_list::add(const char *const *extensions, size_t count)
if (len < sizeof(dst.extensionName))
{
int chars_printed = snprintf(dst.extensionName, len + 1, "%s", extensions[i]);
if (chars_printed >= 0 && static_cast<size_t>(chars_printed) == len)
if (chars_printed >= 0 && (static_cast<size_t>(chars_printed) == len))
{
success = true;
}