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

Error:(2351, 21) error: cast from pointer to smaller type 'jint' (aka 'int') loses information #1028

Open
shashankel opened this issue Oct 16, 2017 · 4 comments

Comments

@shashankel
Copy link

When I try to build the native library see the error Error:(2351, 21) error: cast from pointer to smaller type 'jint' (aka 'int') loses information OSNetworkSystem.cpp

@lukroth
Copy link

lukroth commented May 21, 2018

Any progress here?, I have the same problem...
I can build the app for an emulated device, but when I try to build it for a "real" device it fails with the same error (see one example out of several below).

/app/src/main/jni/OSNetworkSystem.cpp:1475:22: warning: cast to 'signed char *' from smaller integer type 'jint' (aka 'int') [-Wint-to-pointer-cast]
jbyte *message = (jbyte *)address;
^
`

@Bears-Eat-Beets
Copy link

Same problem for me. Any progress?
I've had to update the code to include <cstring> as it was complaining of undefined functions prior to this problem.

@shashankel
Copy link
Author

I am not working on this project anymore. But I remember resolving the error by changing the type from jint to long

@KORuL
Copy link

KORuL commented Dec 9, 2018

The same error when compiling for arm64-v8, does not compile, what should I do?

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