Commit 63da4fe7 by Christian Kern

Fix cpplint warnings

parent 03e4f890
...@@ -271,8 +271,7 @@ Scan(HazardPointerThreadEntry_t* currentHazardPointerEntry) { ...@@ -271,8 +271,7 @@ Scan(HazardPointerThreadEntry_t* currentHazardPointerEntry) {
// a bug... this assertions checks that // a bug... this assertions checks that
int expected = -1; int expected = -1;
if (!currentHazardPointerEntry->GetScanningThread().CompareAndSwap( if (!currentHazardPointerEntry->GetScanningThread().CompareAndSwap(
expected, static_cast<int>(GetCurrentThreadIndex()))) expected, static_cast<int>(GetCurrentThreadIndex()))) {
{
assert(false); assert(false);
} }
#endif #endif
......
...@@ -169,16 +169,17 @@ class FixedSizeList { ...@@ -169,16 +169,17 @@ class FixedSizeList {
*/ */
template< typename GuardType > template< typename GuardType >
class HazardPointerThreadEntry { class HazardPointerThreadEntry {
#ifdef EMBB_DEBUG #ifdef EMBB_DEBUG
public: public:
embb::base::Atomic<int>& GetScanningThread() embb::base::Atomic<int>& GetScanningThread() {
{
return who_is_scanning; return who_is_scanning;
} }
private: private:
embb::base::Atomic<int> who_is_scanning; embb::base::Atomic<int> who_is_scanning;
#endif #endif
private: private:
/** /**
* Value of the undefined guard (means that no guard is set). * Value of the undefined guard (means that no guard is set).
......
...@@ -110,6 +110,9 @@ do ...@@ -110,6 +110,9 @@ do
if [[ $file == *atomic_arithmetic.h ]]; then if [[ $file == *atomic_arithmetic.h ]]; then
current_rules+=",-readability/function" # All parameters should be named in a function current_rules+=",-readability/function" # All parameters should be named in a function
fi fi
if [[ $file == *object_pool-inl.h ]]; then
current_rules+=",-readability/function" # All parameters should be named in a function (triggers error with clang if named...)
fi
for filename in "${RAND_FILES[@]}"; do for filename in "${RAND_FILES[@]}"; do
if [[ $file =~ $filename ]]; then if [[ $file =~ $filename ]]; then
current_rules+=",-runtime/threadsafe_fn" # These tests are allowed to use the thread unsafe rand() current_rules+=",-runtime/threadsafe_fn" # These tests are allowed to use the thread unsafe rand()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment