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

Simulator: GCC 14 Wunused-result #536

Conversation

nmschulte
Copy link
Contributor

GCC 14 is complaining about this syntax

simulator/can/hal_can_lld.cpp: In function ‘void can_lld_stop(CANDriver*)’:
simulator/can/hal_can_lld.cpp:144:20: error: ignoring return value of ‘constexpr _FIter std::remove(_FIter, _FIter, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<CANDriver**, vector<CANDriver*> >; _Tp = CANDriver*]’, declared with attribute ‘nodiscard’ [-Werror=unused-result]
  144 |         std::remove(instances.begin(), instances.end(), canp);
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

https://stackoverflow.com/a/53581957

@mck1117 mck1117 merged commit 158ac76 into FOME-Tech:master Jan 16, 2025
23 checks passed
@nmschulte nmschulte deleted the nms/simulator-gcc-14-nodiscard-Wunused-result branch January 17, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants