8080991: Compilation error with recent clang in java.base/share/native/launcher/main.c: error: comparison of array 'const_jargs' not equal to a null pointer is always true

Reviewed-by: ksrini, ddehaven
This commit is contained in:
Staffan Larsen 2015-05-28 14:54:58 -07:00 committed by Kumar Srinivasan
parent 6c70d53d16
commit 6329a86bca
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, 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
@ -46,6 +46,7 @@
#ifdef JAVA_ARGS
#define HAS_JAVA_ARGS JNI_TRUE
static const char* const_progname = "java";
static const char* const_jargs[] = JAVA_ARGS;
/*
@ -58,6 +59,7 @@ static const char* const_jargs[] = JAVA_ARGS;
#endif /* APP_CLASSPATH */
static const char* const_appclasspath[] = APP_CLASSPATH;
#else /* !JAVA_ARGS */
#define HAS_JAVA_ARGS JNI_FALSE
#ifdef PROGNAME
static const char* const_progname = PROGNAME;
#else

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2015, 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
@ -129,6 +129,6 @@ main(int argc, char **argv)
DOT_VERSION,
(const_progname != NULL) ? const_progname : *margv,
(const_launcher != NULL) ? const_launcher : *margv,
(const_jargs != NULL) ? JNI_TRUE : JNI_FALSE,
HAS_JAVA_ARGS,
const_cpwildcard, const_javaw, const_ergo_class);
}