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 for GCC 8 warning #201

Merged
merged 2 commits into from
Jan 25, 2019
Merged

Fix for GCC 8 warning #201

merged 2 commits into from
Jan 25, 2019

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Jan 24, 2019

This seems to be a bug in 1.7.0 introduced in #187; the == evaluates before the ?. GCC notices this and gives a warning.

@henryiii
Copy link
Collaborator Author

@phlptp, does this look right?

@phlptp
Copy link
Collaborator

phlptp commented Jan 24, 2019

yes the fix looks right.

@phlptp
Copy link
Collaborator

phlptp commented Jan 24, 2019

probably indicates there may be a missing test that would check the false branch of that if statement. If that statement was always evaluating to true (which would be by far the most common case) then it should be possible to craft a failing test case before the fix.

@henryiii
Copy link
Collaborator Author

I’m traveling till Tueday, could you make a test for it?

@phlptp phlptp mentioned this pull request Jan 24, 2019
@codecov
Copy link

codecov bot commented Jan 24, 2019

Codecov Report

Merging #201 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #201   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        1908   1908           
=====================================
  Hits         1908   1908
Impacted Files Coverage Δ
include/CLI/StringTools.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 411364a...1777c91. Read the comment docs.

@codecov
Copy link

codecov bot commented Jan 24, 2019

Codecov Report

Merging #201 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #201   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        1908   1908           
=====================================
  Hits         1908   1908
Impacted Files Coverage Δ
include/CLI/StringTools.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 411364a...b84a2d0. Read the comment docs.

…. The tests were verified to fail if the fix was not in place.
@henryiii henryiii merged commit f542179 into master Jan 25, 2019
@henryiii
Copy link
Collaborator Author

Thanks!

@henryiii henryiii deleted the henryiii-gcc8 branch January 30, 2019 11:37
@henryiii henryiii added this to the v1.7.1 milestone Feb 9, 2019
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