diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b17b9f..765be02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,13 @@ if (VUL_WERROR) endif() endif() +if(${CMAKE_CXX_COMPILER_ID} MATCHES "(GNU|Clang)") + add_compile_options( + -Wall + -Wextra + ) +endif() + add_subdirectory(src) add_subdirectory(include) diff --git a/src/vk_layer_settings.cpp b/src/vk_layer_settings.cpp index 28663a2..01d20df 100644 --- a/src/vk_layer_settings.cpp +++ b/src/vk_layer_settings.cpp @@ -1,7 +1,7 @@ /* - * Copyright (c) 2015-2023 The Khronos Group Inc. - * Copyright (c) 2015-2023 Valve Corporation - * Copyright (c) 2015-2023 LunarG, Inc. + * Copyright (c) 2023 The Khronos Group Inc. + * Copyright (c) 2023 Valve Corporation + * Copyright (c) 2023 LunarG, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ static std::string format(const char *message, ...) { std::size_t const STRING_BUFFER(4096); assert(message != nullptr); - assert(strlen(message) >= 0 && strlen(message) < STRING_BUFFER); + assert(strlen(message) >= 1 && strlen(message) < STRING_BUFFER); char buffer[STRING_BUFFER]; va_list list;