Reduce compiler warnings for -Wall -Wpedantic -Wextra

This commit is contained in:
Tilen Majerle 2022-07-27 11:56:23 +02:00
parent 0485e5dd90
commit ef0adffad5
2 changed files with 11 additions and 3 deletions

View File

@ -19,12 +19,12 @@ add_executable(${PROJECT_NAME})
# Add key executable block
target_sources(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/dev/main.c
)
)
# Add key include paths
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/dev
)
)
# Compilation definition information
target_compile_definitions(${PROJECT_NAME} PUBLIC
@ -32,7 +32,14 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC
_DEBUG
CONSOLE
LWSHELL_DEV
)
)
# Compiler options
target_compile_options(${PROJECT_NAME} PRIVATE
-Wall
-Wextra
-Wpedantic
)
# Add subdir with lwshell and link to project
add_subdirectory("lwshell" lwshell)

View File

@ -78,6 +78,7 @@ subdbl_cmd(int32_t argc, char** argv) {
*/
void
shell_output(const char* str, lwshell_t* lw) {
(void)lw;
printf("%s", str);
if (*str == '\r') {
printf("\n");