On Aug 3, 2010, at 7:37 AM, Stephen Bannasch wrote:

I got this error trying to build last night on MacOS 10.6.4:

cc1plus: warnings being treated as errors
/Users/stephen/dev/java/src/bsd/hotspot/src/share/vm/services/attachListener.cpp: In function 'jint set_uint64_t_flag(const
char*, AttachOperation*, outputStream*)':
/Users/stephen/dev/java/src/bsd/hotspot/src/share/vm/services/attachListener.cpp:265: warning: format '%lu' expects type 'long
unsigned int*', but argument 3 has type 'uint64_t*'
[…]

Here's a patch that fixes that.

The basic problem is that systems tend to vary at random in between using 'long' and 'long long' defining uint64_t, intptr_t, jlong, etc. This (hopefully) doesn't affect programs, but does break -Wformat -Werror.

This was the shortest way I found to get it working on 10.6.4 across x86-32 and -64, but it's based on a somewhat older revision of hotspot. Some assembly might be required.


Attachment: compile_Wformat
Description: Binary data



Reply via email to