Re: function signature "funny"
"Grzegorz B. Prokopski" <[email protected]> Sat, 11 Jun 2005 13:28:07 -0400
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Organization | Debian http://www.debian.org - The Free Operating System |
| Message-ID | <[email protected]> |
On Wed, 2005-08-06 at 17:50 -0400, Peter Lovell wrote: > Hi folks, > I'm trying to get all the warnings out of code we have and I ran into > what seems to be to be an anomaly. > > Considering the following snippet from jni.h > > typedef _svmt_s8 jbyte; > > const jbyte *(JNICALL *GetStringUTFChars) (JNIEnv *env, jstring > string, > jboolean *isCopy); /* 169 */ > void (JNICALL *ReleaseStringUTFChars) (JNIEnv *env, jstring string, > const char *utf); /* 170 */ > > note also that jni_system_specific defines ... > typedef signed char _svmt_s8; Unless I misread, "const jbyte" becomes "const signed char". Isn't that just about the same as "const char"? I mean: "const char" is signed [*], isn't it? Am I missing something or GCC4 is overpicky here? > This is throwing up a bunch of warnings using gcc 4 such as ... > MacOSXAsset.c:234: warning: pointer targets in assignment differ in > signedness GBP [*] I should probably have looked into C89 standard first, but until the end of the month I don't have time for that, sorry. -- Grzegorz B. Prokopski <[email protected]> SableVM - Free, LGPL'ed Java VM http://sablevm.org Why SableVM ?!? http://sablevm.org/wiki/Features Debian GNU/Linux - the Free OS http://www.debian.org