Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autoware_bytetrack): fix clang-diagnostic-implicit-const-int-float-conversion #9513

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on clang-tidy clang-diagnostic-implicit-const-int-float-conversion error.

/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_bytetrack/lib/src/utils.cpp:295:35: error: implicit conversion from 'long' to 'float' changes value from 9223372036854775807 to 9223372036854775808 [clang-diagnostic-implicit-const-int-float-conversion]
  if (extend_cost || cost_limit < LONG_MAX) {
                                ~ ^
/usr/lib/llvm-14/lib/clang/14.0.0/include/limits.h:47:19: note: expanded from macro 'LONG_MAX'
#define LONG_MAX  __LONG_MAX__
                  ^~~~~~~~~~~~
note: expanded from here
/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_bytetrack/lib/src/utils.cpp:302:22: error: implicit conversion from 'long' to 'float' changes value from 9223372036854775807 to 9223372036854775808 [clang-diagnostic-implicit-const-int-float-conversion]
    if (cost_limit < LONG_MAX) {
                   ~ ^
/usr/lib/llvm-14/lib/clang/14.0.0/include/limits.h:47:19: note: expanded from macro 'LONG_MAX'
#define LONG_MAX  __LONG_MAX__
                  ^~~~~~~~~~~~

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
@kobayu858 kobayu858 requested a review from veqcc November 28, 2024 08:42
@github-actions github-actions bot added component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test labels Nov 28, 2024
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@kobayu858 kobayu858 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 29.51%. Comparing base (4e93960) to head (72f5eb9).
Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
perception/autoware_bytetrack/lib/src/utils.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9513      +/-   ##
==========================================
- Coverage   29.51%   29.51%   -0.01%     
==========================================
  Files        1440     1439       -1     
  Lines      108541   108539       -2     
  Branches    41507    41506       -1     
==========================================
- Hits        32034    32033       -1     
+ Misses      73388    73386       -2     
- Partials     3119     3120       +1     
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 29.51% <ø> (+<0.01%) ⬆️ Carriedforward from 4e93960

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kobayu858
Copy link
Contributor Author

The remaining clang-tidy errors in the CI will be fixed at #9468.

@veqcc veqcc added run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels Dec 1, 2024
@kobayu858
Copy link
Contributor Author

@manato @YoshiRi
Please confirm the PR. Thank you very much.

Copy link
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kobayu858 kobayu858 merged commit adb6101 into autowarefoundation:main Dec 2, 2024
53 of 55 checks passed
@kobayu858 kobayu858 deleted the clang-tidy-pe54 branch December 9, 2024 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) tag:require-cuda-build-and-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants