Fix type precision warning in Xcode 9#56
Merged
cameron314 merged 1 commit intocameron314:masterfrom Nov 9, 2017
jonathonracz:master
Merged
Fix type precision warning in Xcode 9#56cameron314 merged 1 commit intocameron314:masterfrom jonathonracz:master
cameron314 merged 1 commit intocameron314:masterfrom
jonathonracz:master
Conversation
Owner
|
Thanks! :-) |
Contributor
Author
|
I would presume the constant 1000 multiplicand is being implicitly cast to Definitely not implicit casting clang wizardry I (or most people) would use naturally, but I guess it just so happened to work out. |
Owner
|
The right-hand expression is compiled independently of the assignment context, so the implicit cast to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing more than it says in the title. Xcode 9 was (rightfully) complaining about the
std::int64_tdata being downcast to an unsigned int (the type of thetv_secfield), so I silenced it with a static cast.This is unlikely to cause issues since the usec-scale time is being divided by 1000000 to convert to sec.