Skip to content

Commit cf19466

Browse files
committed
8345758: AArch64: vm_version_linux_aarch64.cpp report nullptr compile warning by gcc14
1 parent 69e664d commit cf19466

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ static bool read_fully(const char *fname, char *buf, size_t buflen) {
185185
assert(buflen >= 1, "invalid argument");
186186
int fd = os::open(fname, O_RDONLY, 0);
187187
if (fd != -1) {
188+
PRAGMA_DIAG_PUSH
189+
PRAGMA_NONNULL_IGNORED
188190
ssize_t read_sz = ::read(fd, buf, buflen);
191+
PRAGMA_DIAG_POP
189192
::close(fd);
190193

191194
// Skip if the contents is just "\n" because some machine only sets

0 commit comments

Comments
 (0)