use pedantic (#412)

* use pedantic now that memory tools is in another repo

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>

* add pragma to ignore tinydir warning

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
This commit is contained in:
Mikael Arguedas 2019-04-09 20:18:02 +02:00 committed by Michel Hidalgo
parent 64a1412594
commit 121f9708c2
3 changed files with 12 additions and 4 deletions

View file

@ -27,7 +27,7 @@ if(NOT CMAKE_CXX_STANDARD)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra)
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
set(${PROJECT_NAME}_sources

View file

@ -47,7 +47,6 @@ extern "C"
#include "./common.h"
#include "./context_impl.h"
#include "tinydir/tinydir.h"
#define ROS_SECURITY_STRATEGY_VAR_NAME "ROS_SECURITY_STRATEGY"
#define ROS_SECURITY_ENABLE_VAR_NAME "ROS_SECURITY_ENABLE"

View file

@ -13,11 +13,20 @@
// limitations under the License.
#include "rcl/security_directory.h"
#include "tinydir/tinydir.h"
#include "rcl/error_handling.h"
#include "rcutils/filesystem.h"
#include "rcutils/get_env.h"
#include "rcutils/format_string.h"
#include "rcl/error_handling.h"
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wembedded-directive"
#endif
#include "tinydir/tinydir.h"
#ifdef __clang__
# pragma clang diagnostic pop
#endif
/**
* A security lookup function takes in the node's name, namespace, a security root directory and an allocator;