From 8974b05305f252c56c405ddb62b34ceff6c2b72e Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Fri, 8 Jul 2016 10:42:16 +0200 Subject: [PATCH] removed cpplint warnings, added option to allow checking of *.c files again --- algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h | 2 +- base_cpp/include/embb/base/internal/mutex-inl.h | 2 +- base_cpp/test/log_test.cc | 9 ++++----- mtapi_plugins_c/mtapi_opencl_c/src/embb_mtapi_opencl_runtimelinker.c | 1 + scripts/run_cpplint.sh | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h b/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h index e7cabf8..7d7d310 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/base_cpp/include/embb/base/internal/mutex-inl.h b/base_cpp/include/embb/base/internal/mutex-inl.h index ffdbf12..f8aed8e 100644 --- a/base_cpp/include/embb/base/internal/mutex-inl.h +++ b/base_cpp/include/embb/base/internal/mutex-inl.h @@ -28,7 +28,7 @@ #define EMBB_BASE_INTERNAL_MUTEX_INL_H_ #include -#include +#include namespace embb { namespace base { diff --git a/base_cpp/test/log_test.cc b/base_cpp/test/log_test.cc index fe8fde8..3bb0b9c 100644 --- a/base_cpp/test/log_test.cc +++ b/base_cpp/test/log_test.cc @@ -38,18 +38,17 @@ LogTest::LogTest() { CreateUnit("Test all").Add(&LogTest::Test, this); } -static std::string logged_message; - static void test_log_function(void * context, char const * msg) { - EMBB_UNUSED(context); - logged_message = msg; + std::string * logged_message = reinterpret_cast(context); + *logged_message = msg; } void LogTest::Test() { using embb::base::Log; char const * test_msg = "hello"; + std::string logged_message; - Log::SetLogFunction(0, test_log_function); + Log::SetLogFunction(&logged_message, test_log_function); Log::SetLogLevel(EMBB_LOG_LEVEL_TRACE); logged_message = "none"; diff --git a/mtapi_plugins_c/mtapi_opencl_c/src/embb_mtapi_opencl_runtimelinker.c b/mtapi_plugins_c/mtapi_opencl_c/src/embb_mtapi_opencl_runtimelinker.c index e96f9d9..e21fbde 100644 --- a/mtapi_plugins_c/mtapi_opencl_c/src/embb_mtapi_opencl_runtimelinker.c +++ b/mtapi_plugins_c/mtapi_opencl_c/src/embb_mtapi_opencl_runtimelinker.c @@ -26,6 +26,7 @@ #include #include +#include ////////////////////////////////////////////////////////////////////////// // function pointer wrappers to hide runtime linking diff --git a/scripts/run_cpplint.sh b/scripts/run_cpplint.sh index 106d6e4..c9d633b 100755 --- a/scripts/run_cpplint.sh +++ b/scripts/run_cpplint.sh @@ -120,7 +120,7 @@ do current_rules+=",-runtime/threadsafe_fn" # These tests are allowed to use the thread unsafe rand() fi done - python ${c} --filter=$current_rules --root="$project/include" --output=vs7 $file + python ${c} --extensions=c,cc,h --filter=$current_rules --root="$project/include" --output=vs7 $file if [[ ! $? -eq 0 ]]; then retval=$((retval+1)) fi -- libgit2 0.26.0