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

unreachable code #4280

Closed
torsten48 opened this issue Dec 29, 2024 · 2 comments
Closed

unreachable code #4280

torsten48 opened this issue Dec 29, 2024 · 2 comments

Comments

@torsten48
Copy link
Contributor

torsten48 commented Dec 29, 2024

latest release (11.1.1), MSC 19.42.34433 (VS2022 with latest updates) complains:

fmt\include\fmt\base.h(1538) : warning C4702: unreachable code
fmt\include\fmt\base.h(1542) : warning C4702: unreachable code
fmt\include\fmt\format.h(3425) : warning C4702: unreachable code

enable/disable FMT_NORETURN resp. [[noreturn]] has no effect.

if (end - fill_end <= 0) {
  report_error("invalid format specifier");
  return begin;
}

Do other compiler complain if return begin; is removed?

@GamesTrap
Copy link
Contributor

I've also got some unreachable code warnings with fmt 11.1.1 CI log:

C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\format.h(3508) : error C2220: the following warning is treated as an error
C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\format.h(2188) : warning C4702: unreachable code
C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\base.h(893) : warning C4702: unreachable code
C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\base.h(1324) : warning C4702: unreachable code
C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\base.h(1408) : warning C4702: unreachable code
C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\base.h(1538) : warning C4702: unreachable code
C:\actions-runner\_work\TRAP\TRAP\Dependencies\fmt\include\fmt\base.h(1542) : warning C4702: unreachable code

@vitaut
Copy link
Contributor

vitaut commented Jan 2, 2025

We don't actively look into level 4 warnings since they are mostly noise but a PR to fix them would be welcome provided that it's not too intrusive.

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

No branches or pull requests

3 participants