mirror of
https://github.com/MaJerle/lwshell.git
synced 2025-02-06 13:08:22 +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
|
# Add key executable block
|
||||||
target_sources(${PROJECT_NAME} PUBLIC
|
target_sources(${PROJECT_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR}/dev/main.c
|
${CMAKE_CURRENT_LIST_DIR}/dev/main.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add key include paths
|
# Add key include paths
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR}/dev
|
${CMAKE_CURRENT_LIST_DIR}/dev
|
||||||
)
|
)
|
||||||
|
|
||||||
# Compilation definition information
|
# Compilation definition information
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
||||||
@ -32,7 +32,14 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC
|
|||||||
_DEBUG
|
_DEBUG
|
||||||
CONSOLE
|
CONSOLE
|
||||||
LWSHELL_DEV
|
LWSHELL_DEV
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Compiler options
|
||||||
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
|
-Wall
|
||||||
|
-Wextra
|
||||||
|
-Wpedantic
|
||||||
|
)
|
||||||
|
|
||||||
# Add subdir with lwshell and link to project
|
# Add subdir with lwshell and link to project
|
||||||
add_subdirectory("lwshell" lwshell)
|
add_subdirectory("lwshell" lwshell)
|
||||||
|
@ -78,6 +78,7 @@ subdbl_cmd(int32_t argc, char** argv) {
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
shell_output(const char* str, lwshell_t* lw) {
|
shell_output(const char* str, lwshell_t* lw) {
|
||||||
|
(void)lw;
|
||||||
printf("%s", str);
|
printf("%s", str);
|
||||||
if (*str == '\r') {
|
if (*str == '\r') {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user