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

[Developer Issue]: warnings in run-clang-tidy github action #429

Open
k-doering-NOAA opened this issue Aug 2, 2023 · 2 comments
Open

[Developer Issue]: warnings in run-clang-tidy github action #429

k-doering-NOAA opened this issue Aug 2, 2023 · 2 comments
Labels
P3 low priority task theme: code cleanup
Milestone

Comments

@k-doering-NOAA
Copy link
Member

Issue details

I realized there are a few warnings in the run-clang-tidy job on the main branch that suggest cleaning up a few minor things in fims. I think they are all of a similar form:

warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
  ret = vsnprintf(buff_ptr.get(), size, msg, args);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/FIMS/_build/_deps/googlebenchmark-src/src/string_util.cc:154:3: note: Value stored to 'ret' is never read
  ret = vsnprintf(buff_ptr.get(), size, msg, args);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Look in the run step to see all of the warnings.

@k-doering-NOAA k-doering-NOAA added the status: triage_needed This is not approved for this milestone, do not work on it yet label Aug 2, 2023
@msupernaw
Copy link
Contributor

msupernaw commented Aug 2, 2023 via email

@k-doering-NOAA
Copy link
Member Author

Ah, good point about that one, thanks!

I think there were a few that are similar, that are in the FIMS code, e.g.,

/home/runner/work/FIMS/FIMS/tests/gtest/test_population_Unfished_Initial.cpp:23:28: warning: Value stored to 'index_yf' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
                    size_t index_yf = year * population.nfleets + fleet_index;
                           ^~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/FIMS/FIMS/tests/gtest/test_population_Unfished_Initial.cpp:23:28: note: Value stored to 'index_yf' during its initialization is never read
                    size_t index_yf = year * population.nfleets + fleet_index;
                           ^~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Andrea-Havron-NOAA Andrea-Havron-NOAA added P3 low priority task and removed status: triage_needed This is not approved for this milestone, do not work on it yet labels Aug 8, 2023
@Andrea-Havron-NOAA Andrea-Havron-NOAA added this to the MQ milestone Aug 8, 2023
@Andrea-Havron-NOAA Andrea-Havron-NOAA added the status: triage_needed This is not approved for this milestone, do not work on it yet label Oct 4, 2023
@ChristineStawitz-NOAA ChristineStawitz-NOAA modified the milestones: MQ, 2 Oct 4, 2023
@ChristineStawitz-NOAA ChristineStawitz-NOAA removed the status: triage_needed This is not approved for this milestone, do not work on it yet label Oct 4, 2023
@ChristineStawitz-NOAA ChristineStawitz-NOAA modified the milestones: 2, Parking lot Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 low priority task theme: code cleanup
Projects
None yet
Development

No branches or pull requests

4 participants