autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
1.02k stars 652 forks source link

chore(autoware_behavior_velocity_intersection_module): include opencv as system #9330

Closed yhisaki closed 1 week ago

yhisaki commented 1 week ago

Description

To suppress the following error from clang-tidy, we include opencv as a system header.

/home/hisaki/workspace/clang-tidy-ci/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection_occlusion.cpp:307:43: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
  occlusion_mask = cv::Mat(width, height, CV_8UC1, cv::Scalar(0));
                                          ^
/usr/include/opencv4/opencv2/core/hal/interface.h:88:17: note: expanded from macro 'CV_8UC1'
#define CV_8UC1 CV_MAKETYPE(CV_8U,1)
                ^~~~~~~~~~~~~~~~~~~~
/usr/include/opencv4/opencv2/core/hal/interface.h:85:32: note: expanded from macro 'CV_MAKETYPE'
#define CV_MAKETYPE(depth,cn) (CV_MAT_DEPTH(depth) + (((cn)-1) << CV_CN_SHIFT))
                               ^~~~~~~~~~~~~~~~~~~
/usr/include/opencv4/opencv2/core/hal/interface.h:83:34: note: expanded from macro 'CV_MAT_DEPTH'
#define CV_MAT_DEPTH(flags)     ((flags) & CV_MAT_DEPTH_MASK)
                                 ^~~~~~~
/usr/include/opencv4/opencv2/core/mat.inl.hpp:2116:9: error: '_Atomic' is a C11 extension [clang-diagnostic-c11-extensions]
        CV_XADD(&this->hdr->refcount, 1);
        ^
/usr/include/opencv4/opencv2/core/cvdef.h:670:60: note: expanded from macro 'CV_XADD'
#      define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)
                                                           ^
/usr/include/opencv4/opencv2/core/mat.inl.hpp:2131:21: error: '_Atomic' is a C11 extension [clang-diagnostic-c11-extensions]
        if( m.hdr ) CV_XADD(&m.hdr->refcount, 1);
                    ^
/usr/include/opencv4/opencv2/core/cvdef.h:670:60: note: expanded from macro 'CV_XADD'
#      define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)

Related links

Parent Issue:

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

github-actions[bot] commented 1 week ago

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 29.63%. Comparing base (e54020e) to head (ea96d50). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9330 +/- ## ========================================== - Coverage 29.80% 29.63% -0.17% ========================================== Files 1338 1343 +5 Lines 103208 103259 +51 Branches 40216 40213 -3 ========================================== - Hits 30757 30601 -156 - Misses 69467 69700 +233 + Partials 2984 2958 -26 ``` | [Flag](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/9330/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [differential](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/9330/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `17.11% <ø> (?)` | | | | [total](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/9330/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `29.64% <ø> (-0.16%)` | :arrow_down: | Carriedforward from [3b623fb](https://app.codecov.io/gh/autowarefoundation/autoware.universe/commit/3b623fbd8cd0ffc3afd1bd0ac9f212386a97e078?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.