mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
8037816: Fix for 8036122 breaks build with Xcode5/clang
Repaired or selectively disabled offending formats; future-proofed with additional checking Reviewed-by: kvn, jrose, stefank
This commit is contained in:
parent
563feb9091
commit
305ec3bd3f
293 changed files with 1285 additions and 913 deletions
|
@ -102,6 +102,8 @@
|
|||
# include <inttypes.h>
|
||||
# include <sys/ioctl.h>
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
// if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling
|
||||
// getrusage() is prepared to handle the associated failure.
|
||||
#ifndef RUSAGE_THREAD
|
||||
|
@ -2138,7 +2140,7 @@ void os::print_os_info(outputStream* st) {
|
|||
// Print warning if unsafe chroot environment detected
|
||||
if (unsafe_chroot_detected) {
|
||||
st->print("WARNING!! ");
|
||||
st->print_cr(unstable_chroot_error);
|
||||
st->print_cr("%s", unstable_chroot_error);
|
||||
}
|
||||
|
||||
os::Linux::print_libversion_info(st);
|
||||
|
@ -2199,8 +2201,8 @@ void os::Linux::print_distro_info(outputStream* st) {
|
|||
void os::Linux::print_libversion_info(outputStream* st) {
|
||||
// libc, pthread
|
||||
st->print("libc:");
|
||||
st->print(os::Linux::glibc_version()); st->print(" ");
|
||||
st->print(os::Linux::libpthread_version()); st->print(" ");
|
||||
st->print("%s ", os::Linux::glibc_version());
|
||||
st->print("%s ", os::Linux::libpthread_version());
|
||||
if (os::Linux::is_LinuxThreads()) {
|
||||
st->print("(%s stack)", os::Linux::is_floating_stack() ? "floating" : "fixed");
|
||||
}
|
||||
|
@ -3417,7 +3419,7 @@ char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment, char
|
|||
// the system is still "fresh".
|
||||
if (warn_on_failure) {
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to reserve shared memory (errno = %d).", errno);
|
||||
warning(msg);
|
||||
warning("%s", msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3435,7 +3437,7 @@ char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment, char
|
|||
if ((intptr_t)addr == -1) {
|
||||
if (warn_on_failure) {
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to attach shared memory (errno = %d).", err);
|
||||
warning(msg);
|
||||
warning("%s", msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3455,7 +3457,7 @@ static void warn_on_large_pages_failure(char* req_addr, size_t bytes, int error)
|
|||
char msg[128];
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to reserve large pages memory req_addr: "
|
||||
PTR_FORMAT " bytes: " SIZE_FORMAT " (errno = %d).", req_addr, bytes, error);
|
||||
warning(msg);
|
||||
warning("%s", msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue