Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Get rid of simulator build warnings

Oleg Kalachev378db51de99e
diff --git a/gazebo/Arduino.h b/gazebo/Arduino.h
index 7ea6f90..48b56de 100644
--- a/gazebo/Arduino.h
+++ b/gazebo/Arduino.h
@@ -117,7 +117,7 @@ public:
int read() {
if (available()) {
char c;
- ::read(STDIN_FILENO, &c, 1); // use raw read to avoid C++ buffering
+ size_t res = ::read(STDIN_FILENO, &c, 1); // use raw read to avoid C++ buffering
// https://stackoverflow.com/questions/45238997/does-getchar-function-has-its-own-buffer-to-store-remaining-input
return c;
}
diff --git a/gazebo/CMakeLists.txt b/gazebo/CMakeLists.txt
index 5bb0eb3..2fbab01 100644
--- a/gazebo/CMakeLists.txt
+++ b/gazebo/CMakeLists.txt
@@ -15,6 +15,7 @@ set(CMAKE_BUILD_TYPE RelWithDebInfo)
add_library(flix SHARED simulator.cpp)
target_link_libraries(flix ${GAZEBO_LIBRARIES} ${SDL2_LIBRARIES})
target_include_directories(flix PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+target_compile_options(flix PRIVATE -Wno-address-of-packed-member) # disable unneeded mavlink warnings
# Include dir for MAVLink-Arduino library
target_include_directories(flix PUBLIC $ENV{HOME}/Arduino/libraries/MAVLink)