Mercurial > hg > icedtea8-forest > hotspot
changeset 10903:03570d8cebe0
8223186: HotSpot compile warnings from GCC 9
Reviewed-by: dholmes, aeubanks, sgehwolf
author | ysuenaga |
---|---|
date | Sat, 11 May 2019 01:17:18 +0900 |
parents | b316aa340b90 |
children | 827e57cd9f8a |
files | src/os/linux/vm/osContainer_linux.cpp src/share/vm/prims/jvmtiExport.hpp |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/linux/vm/osContainer_linux.cpp Wed Jan 20 01:23:14 2021 +0000 +++ b/src/os/linux/vm/osContainer_linux.cpp Sat May 11 01:17:18 2019 +0900 @@ -495,7 +495,7 @@ } if (memory->is_hierarchical()) { const char* matchline = "hierarchical_memory_limit"; - char* format = "%s " JULONG_FORMAT; + const char* format = "%s " JULONG_FORMAT; GET_CONTAINER_INFO_LINE(julong, memory, "/memory.stat", matchline, "Hierarchical Memory Limit is: " JULONG_FORMAT, format, hier_memlimit) if (hier_memlimit >= _unlimited_memory) { @@ -522,7 +522,7 @@ } if (memory->is_hierarchical()) { const char* matchline = "hierarchical_memsw_limit"; - char* format = "%s " JULONG_FORMAT; + const char* format = "%s " JULONG_FORMAT; GET_CONTAINER_INFO_LINE(julong, memory, "/memory.stat", matchline, "Hierarchical Memory and Swap Limit is : " JULONG_FORMAT, format, hier_memlimit) if (hier_memlimit >= _unlimited_memory) {
--- a/src/share/vm/prims/jvmtiExport.hpp Wed Jan 20 01:23:14 2021 +0000 +++ b/src/share/vm/prims/jvmtiExport.hpp Sat May 11 01:17:18 2019 +0900 @@ -389,7 +389,7 @@ public: JvmtiCodeBlobDesc(const char *name, address code_begin, address code_end) { assert(name != NULL, "all code blobs must be named"); - strncpy(_name, name, sizeof(_name)); + strncpy(_name, name, sizeof(_name) - 1); _name[sizeof(_name)-1] = '\0'; _code_begin = code_begin; _code_end = code_end;