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

Unused variable 'kMinExp' #935

Closed
zerodefect opened this issue Jan 25, 2018 · 3 comments
Closed

Unused variable 'kMinExp' #935

zerodefect opened this issue Jan 25, 2018 · 3 comments
Assignees
Labels
solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Milestone

Comments

@zerodefect
Copy link
Contributor

Bug Report

  • What is the issue you have?

Unused variable 'kMinExp' in to_chars.hpp, specifically in function:

template <typename FloatType>
boundaries compute_boundaries(FloatType value)

then see:

constexpr int      kMinExp    = 1 - kBias;

Depending on level of compiler warnings/errors, this can fail a build.

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?

Using cmake with ExternalProject_add() and building code with '-Wunused-variable' and '-Werror'

  • What is the expected behavior?

Successful build.

  • And what is the actual behavior instead?

Compiler error.

Clang 4.0

  • Did you use a released version of the library or the version from the develop branch?

Released, but it looks to be a problem in the 'develop'

Yes.

@abolz
Copy link
Contributor

abolz commented Jan 25, 2018

Could you open a PR and replace 1-kBias in line 207 with kMinExp?

@zerodefect
Copy link
Contributor Author

I'll do that. I wasn't sure if there was a code bug in there, so I thought I'd raise the problem before making changes.

@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Jan 25, 2018
@nlohmann
Copy link
Owner

Fixed by merging #936.

@nlohmann nlohmann self-assigned this Jan 27, 2018
@nlohmann nlohmann added this to the Release 3.1.0 milestone Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

3 participants