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

Cast unsigned int #37

Closed
marinofaggiana opened this issue Aug 24, 2017 · 1 comment
Closed

Cast unsigned int #37

marinofaggiana opened this issue Aug 24, 2017 · 1 comment

Comments

@marinofaggiana
Copy link

On :

PRBool nsCharSetProber::FilterWithoutEnglishLetters(const char* aBuf, PRUint32 aLen, char** newBuf, PRUint32& newLen)

&

PRBool nsCharSetProber::FilterWithEnglishLetters(const char* aBuf, PRUint32 aLen, char** newBuf, PRUint32& newLen)

Cast :

newLen = (unsigned int)(newptr - *newBuf);

@Jehan
Copy link
Collaborator

Jehan commented Aug 27, 2017

Thanks. I don't get any compilation warning or anything, but obviously this makes sense, so let's do it.
I casted to PRUint32 instead (which is the same as unsigned int since it's a typedef but it's more proper to do it this way).
Next time, just send me a patch, then you get proper authorship. :-)
Also, I'm sure you already know since I told you, and you do it on purpose because you know I still monitor here, but I would prefer if you reported bugs on Freedesktop's bug tracker. :P
See the page: https://www.freedesktop.org/wiki/Software/uchardet/

In any case, thanks again!

commit 1898847
Author: Jehan jehan@girinstud.io
Date: Sun Aug 27 13:01:30 2017 +0200

src: cast value to its proper type.

Thanks to Marino Faggiana for reporting it.
See: https://github.com/BYVoid/uchardet/issues/37

src/nsCharSetProber.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

@Jehan Jehan closed this as completed Aug 27, 2017
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

2 participants