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

Will libqrencode support arm64 ? #56

Open
cuichunjian opened this issue Nov 18, 2014 · 5 comments
Open

Will libqrencode support arm64 ? #56

cuichunjian opened this issue Nov 18, 2014 · 5 comments

Comments

@cuichunjian
Copy link

you know, apple will reject any app that doesn't support arm64 before next Feb. That means all third-party frameworks in my project need support arm64. libqrencode is a good framework, so will it support arm64 proccessor?

@fukuchi
Copy link
Owner

fukuchi commented Nov 18, 2014

While I want to support arm64 platform, I have no machines to test it. I'd like to ask you to test the latest libqrencode on arm64 and let us know if you found any issues.

@billykan
Copy link

I have tried to compile libqrencode on arm64 and got two compilation warnings "Implicit conversion loses integer precision 'unsigned long' to int". They are from qrencode.c under the functions QRcode_encodeString8bit and QRcode_encodeString8bitStructured. In both cases, the problematic code is:

ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string);

The problem is strlen() is returning "unsigned long" under arm64 and QRinput_append accepts "int" instead, causing a truncation of value.

Hope it helps.

@billykan
Copy link

The other issues are in split.c where there were many pointer arithmetics and the results are stored in int - again truncation would occur when as pointers are changed to 8 bytes in arm64

@ArtSabintsev
Copy link

@billykan if you know ahead of time that you're dealign with small values, you can silence that warning by typecasting to uint32_t:

ret = QRinput_append(input, QR_MODE_8, (uint32_t)strlen(string), (unsigned char *)string);

I feel your pain though.

@fukuchi
Copy link
Owner

fukuchi commented Dec 7, 2014

Thank you @billykan and @ArtSabintsev for your reports. I'll fix this issue in the development branch.

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

4 participants