mirror of
https://github.com/MaJerle/lwshell.git
synced 2025-01-25 13:02:54 +08:00
Reduce compiler warnings for -Wall -Wpedantic -Wextra
This commit is contained in:
parent
0485e5dd90
commit
ef0adffad5
@ -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)
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user