Skip to content

Commit 11aa6e1

Browse files
author
Fairoz Matte
committed
8373270: GCC 14.2.0 reports warning: '%s' directive output may be truncated
Reviewed-by: kbarrett, dholmes, alanb
1 parent 54430a8 commit 11aa6e1

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/java.base/unix/native/libjli/java_md_common.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -259,29 +259,6 @@ JLI_ReportExceptionDescription(JNIEnv * env) {
259259
(*env)->ExceptionDescribe(env);
260260
}
261261

262-
/*
263-
* Since using the file system as a registry is a bit risky, perform
264-
* additional sanity checks on the identified directory to validate
265-
* it as a valid JDK.
266-
*
267-
* Return 0 if the tests fail; otherwise return non-zero (true).
268-
*
269-
* Note that checking for anything more than the existence of an
270-
* executable object at bin/java relative to the path being checked
271-
* will break the regression tests.
272-
*/
273-
static int
274-
CheckSanity(char *path, char *dir)
275-
{
276-
char buffer[PATH_MAX];
277-
278-
if (JLI_StrLen(path) + JLI_StrLen(dir) + 11 > PATH_MAX)
279-
return (0); /* Silently reject "impossibly" long paths */
280-
281-
JLI_Snprintf(buffer, sizeof(buffer), "%s/%s/bin/java", path, dir);
282-
return ((access(buffer, X_OK) == 0) ? 1 : 0);
283-
}
284-
285262
/*
286263
* "Borrowed" from Solaris 10 where the unsetenv() function is being added
287264
* to libc thanks to SUSv3 (Standard Unix Specification, version 3). As

0 commit comments

Comments
 (0)