mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:03:34 +08:00
Warning fixes
This commit is contained in:
@@ -102,7 +102,6 @@ if (DEBUG_BUILD)
|
|||||||
|
|
||||||
if (COMPILER_IS_GCC_COMPATIBLE)
|
if (COMPILER_IS_GCC_COMPATIBLE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic -Wfloat-equal -Wconversion -Wsign-conversion")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic -Wfloat-equal -Wconversion -Wsign-conversion")
|
||||||
set(exec_common_flags "")
|
|
||||||
set(cpp03_flags "-std=c++03 -Wno-variadic-macros -Wno-long-long")
|
set(cpp03_flags "-std=c++03 -Wno-variadic-macros -Wno-long-long")
|
||||||
set(optim_flags "-O3 -DNDEBUG -g0")
|
set(optim_flags "-O3 -DNDEBUG -g0")
|
||||||
else ()
|
else ()
|
||||||
@@ -121,9 +120,9 @@ if (DEBUG_BUILD)
|
|||||||
|
|
||||||
# GTest executables
|
# GTest executables
|
||||||
find_package(GTest REQUIRED)
|
find_package(GTest REQUIRED)
|
||||||
add_libuavcan_test(libuavcan_test uavcan "${exec_common_flags}") # Default
|
add_libuavcan_test(libuavcan_test uavcan "") # Default
|
||||||
add_libuavcan_test(libuavcan_test_cpp03 uavcan_cpp03 "${exec_common_flags} ${cpp03_flags}") # C++03
|
add_libuavcan_test(libuavcan_test_cpp03 uavcan_cpp03 "${cpp03_flags}") # C++03
|
||||||
add_libuavcan_test(libuavcan_test_optim uavcan_optim "${exec_common_flags} ${optim_flags}") # Max optimization
|
add_libuavcan_test(libuavcan_test_optim uavcan_optim "${optim_flags}") # Max optimization
|
||||||
else ()
|
else ()
|
||||||
message(STATUS "Release build type: " ${CMAKE_BUILD_TYPE})
|
message(STATUS "Release build type: " ${CMAKE_BUILD_TYPE})
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -894,7 +894,7 @@ class UAVCAN_EXPORT YamlStreamer<Array<T, ArrayMode, MaxSize> >
|
|||||||
s << '[';
|
s << '[';
|
||||||
for (typename ArrayType::SizeType i = 0; i < array.size(); i++)
|
for (typename ArrayType::SizeType i = 0; i < array.size(); i++)
|
||||||
{
|
{
|
||||||
YamlStreamer<T>::stream(s, array.at(typename ArrayType::SizeType(i)), 0);
|
YamlStreamer<T>::stream(s, array.at(i), 0);
|
||||||
if ((i + 1) < array.size())
|
if ((i + 1) < array.size())
|
||||||
{
|
{
|
||||||
s << ", ";
|
s << ", ";
|
||||||
|
|||||||
Reference in New Issue
Block a user