Fix visual studio warnings for signed/unsigned comparison and unused variable#14
Open
NWilson wants to merge 1 commit intoxiph:masterfrom
Open
Fix visual studio warnings for signed/unsigned comparison and unused variable#14NWilson wants to merge 1 commit intoxiph:masterfrom
NWilson wants to merge 1 commit intoxiph:masterfrom
Conversation
Author
|
Ping - any chance of merging this? |
tmatth
requested changes
Jan 9, 2018
| for (i=0;i<st->den_rate;i++) | ||
| { | ||
| spx_int32_t j; | ||
| spx_uint32_t j; |
Member
There was a problem hiding this comment.
How about using a spx_int32_t filt_len temporary instead? That way you can avoid adding casts inside the loop and even delete one that's already there.
| #define OVERRIDE_INTERPOLATE_PRODUCT_DOUBLE | ||
| static inline double interpolate_product_double(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac) { | ||
| int i; | ||
| unsigned int i; |
Member
There was a problem hiding this comment.
I'm wary about changing these index variables to unsigned as this has burned libspeex before: 1e2f99.
Less intrusive would be to promote the upper limit variable (e.g., len) to signed, or live with the warnings.
f8267e8 to
c73d2f3
Compare
Author
|
It's been a while, sorry! But I've updated with the changes you requested. |
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.
I can confirmed that with these changes, the resampling sounds the same (and I'd expect it to sound terrible if something wrapped that shouldn't). Tested with floating-point only, but the same branches are covered for fixed.