8309219: Fix xlc17 clang 15 warnings in java.base
Reviewed-by: goetz, mdoerr
This commit is contained in:
parent
177e8327d6
commit
6eddbe26dd
@ -46,6 +46,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
|
||||
DISABLED_WARNINGS_gcc_net_util_md.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc_NetworkInterface.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_net_util_md.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_aix_DefaultProxySelector.c := deprecated-non-prototype, \
|
||||
DISABLED_WARNINGS_clang_aix_NetworkInterface.c := gnu-pointer-arith, \
|
||||
DISABLED_WARNINGS_microsoft_InetAddress.c := 4244, \
|
||||
DISABLED_WARNINGS_microsoft_ResolverConfigurationImpl.c := 4996, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
|
@ -198,6 +198,7 @@ ifeq ($(call isTargetOs, aix), true)
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS) \
|
||||
$(addprefix -I, $(LIBJLI_SRC_DIRS)), \
|
||||
DISABLED_WARNINGS_clang_aix := format-nonliteral deprecated-non-prototype, \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
|
||||
|
||||
|
@ -39,7 +39,7 @@ static int dladdr_dont_reload(void *addr, Dl_info *info) {
|
||||
memset((void *)info, 0, sizeof(Dl_info));
|
||||
for (;;) {
|
||||
if (addr >= p->ldinfo_textorg &&
|
||||
addr < p->ldinfo_textorg + p->ldinfo_textsize) {
|
||||
(char*)addr < (char*)(p->ldinfo_textorg) + p->ldinfo_textsize) {
|
||||
info->dli_fname = p->ldinfo_filename;
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -622,7 +622,7 @@ jint unix_getChildren(JNIEnv *env, jlong jpid, jlongArray jarray,
|
||||
static int getPsinfo(pid_t pid, psinfo_t *psinfo) {
|
||||
FILE* fp;
|
||||
char fn[32];
|
||||
int ret;
|
||||
size_t ret;
|
||||
|
||||
/*
|
||||
* Try to open /proc/%d/psinfo
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1248,7 +1248,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_fgetxattr0(JNIEnv* env, jclass clazz,
|
||||
|
||||
#ifdef __linux__
|
||||
res = fgetxattr(fd, name, value, valueLen);
|
||||
#elif _ALLBSD_SOURCE
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
res = fgetxattr(fd, name, value, valueLen, 0, 0);
|
||||
#else
|
||||
throwUnixException(env, ENOTSUP);
|
||||
@ -1269,7 +1269,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_fsetxattr0(JNIEnv* env, jclass clazz,
|
||||
|
||||
#ifdef __linux__
|
||||
res = fsetxattr(fd, name, value, valueLen, 0);
|
||||
#elif _ALLBSD_SOURCE
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
res = fsetxattr(fd, name, value, valueLen, 0, 0);
|
||||
#else
|
||||
throwUnixException(env, ENOTSUP);
|
||||
@ -1288,7 +1288,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_fremovexattr0(JNIEnv* env, jclass clazz,
|
||||
|
||||
#ifdef __linux__
|
||||
res = fremovexattr(fd, name);
|
||||
#elif _ALLBSD_SOURCE
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
res = fremovexattr(fd, name, 0);
|
||||
#else
|
||||
throwUnixException(env, ENOTSUP);
|
||||
@ -1307,7 +1307,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_flistxattr(JNIEnv* env, jclass clazz,
|
||||
|
||||
#ifdef __linux__
|
||||
res = flistxattr(fd, list, (size_t)size);
|
||||
#elif _ALLBSD_SOURCE
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
res = flistxattr(fd, list, (size_t)size, 0);
|
||||
#else
|
||||
throwUnixException(env, ENOTSUP);
|
||||
|
@ -143,7 +143,7 @@ Java_GetXSpace_getSpace0
|
||||
(*env)->ReleaseStringChars(env, root, strchars);
|
||||
|
||||
struct statfs buf;
|
||||
int result = statfs((const char*)chars, &buf);
|
||||
int result = statfs(chars, &buf);
|
||||
free(chars);
|
||||
if (result < 0) {
|
||||
JNU_ThrowByNameWithLastError(env, "java/lang/RuntimeException",
|
||||
|
Loading…
x
Reference in New Issue
Block a user