diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 6c9b09993f..caff371f61 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1775,6 +1775,12 @@ workspaces wp writelines WRONLY +Wconversion +Wformat +Woverloaded +Wshadow +Wsign +Wundef wrs WSL www diff --git a/Os/Task.hpp b/Os/Task.hpp index 3555c22fc6..2b403cf251 100644 --- a/Os/Task.hpp +++ b/Os/Task.hpp @@ -41,7 +41,7 @@ namespace Os { TaskStatus start(const Fw::StringBase &name, taskRoutine routine, void* arg, NATIVE_UINT_TYPE priority = TASK_DEFAULT, NATIVE_UINT_TYPE stackSize = TASK_DEFAULT, NATIVE_UINT_TYPE cpuAffinity = TASK_DEFAULT, NATIVE_UINT_TYPE identifier = TASK_DEFAULT); //!< start the task // Deprecated: only the name, routine, and argument are **required** parameters. This ordering of parameters is therefore inappropriate and will be removed in the future - DEPRECATED(TaskStatus start(const Fw::StringBase &name, NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, taskRoutine routine, void* arg, NATIVE_INT_TYPE cpuAffinity = TASK_DEFAULT), + DEPRECATED(TaskStatus start(const Fw::StringBase &name, NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, taskRoutine routine, void* arg, NATIVE_INT_TYPE cpuAffinity = static_cast(TASK_DEFAULT)), "Please switch to start(Fw::StringBase &name, taskRoutine routine, void* arg, NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, NATIVE_UINT_TYPE identifier)"); //!< start the task I32 getIdentifier(); //!< get the identifier for the task static TaskId getOsIdentifier(); //Gets the Os Task ID. Useful for passive components. diff --git a/Ref/CMakeLists.txt b/Ref/CMakeLists.txt index 0684549223..54fa2f021b 100644 --- a/Ref/CMakeLists.txt +++ b/Ref/CMakeLists.txt @@ -50,4 +50,21 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top/") set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Top/Main.cpp") set(MOD_DEPS ${PROJECT_NAME}/Top) -register_fprime_deployment() \ No newline at end of file +register_fprime_deployment() +if (NOT FPRIME_FPP_LOCS_BUILD) +# The following compile options will only apply to the deployment executable. +# The extra warnings trigger in core F Prime so we don't apply them there. +target_compile_options("${PROJECT_NAME}" PUBLIC -Wall) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wextra) +target_compile_options("${PROJECT_NAME}" PUBLIC -Werror) +#target_compile_options("${PROJECT_NAME}" PUBLIC -Wshadow) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wconversion) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wsign-conversion) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wformat-security) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wnon-virtual-dtor) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wold-style-cast) +target_compile_options("${PROJECT_NAME}" PUBLIC -Woverloaded-virtual) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wno-unused-parameter) +target_compile_options("${PROJECT_NAME}" PUBLIC -Wundef) +set_property(TARGET "${PROJECT_NAME}" PROPERTY CXX_STANDARD 11) +endif() diff --git a/Ref/Top/Main.cpp b/Ref/Top/Main.cpp index e4852b43f9..943f265d88 100644 --- a/Ref/Top/Main.cpp +++ b/Ref/Top/Main.cpp @@ -44,7 +44,6 @@ int main(int argc, char* argv[]) { char *hostname; option = 0; hostname = nullptr; - bool dump = false; while ((option = getopt(argc, argv, "hdp:a:")) != -1){ switch(option) { @@ -53,16 +52,13 @@ int main(int argc, char* argv[]) { return 0; break; case 'p': - port_number = atoi(optarg); + port_number = static_cast(atoi(optarg)); break; case 'a': hostname = optarg; break; case '?': return 1; - case 'd': - dump = true; - break; default: print_usage(argv[0]); return 1;