8196990: Resolve disabled warnings for libjli

Initialized uninitialzed data to avoid maybe-uninitialized warnings from gcc

Reviewed-by: jlaskey
This commit is contained in:
Srinivas Dama 2018-06-08 21:06:54 +05:30
parent 824b2d53ac
commit 79ac24439f
2 changed files with 2 additions and 1 deletions

View File

@ -298,7 +298,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
OPTIMIZATION := HIGH, \
CFLAGS := $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := maybe-uninitialized, \
DISABLED_WARNINGS_solstudio := \
E_ASM_DISABLES_OPTIMIZATION \
E_STATEMENT_NOT_REACHED, \

View File

@ -305,6 +305,8 @@ static JLI_List readArgFile(FILE *file) {
ctx.state = FIND_NEXT;
ctx.parts = JLI_List_new(4);
// initialize to avoid -Werror=maybe-uninitialized issues from gcc 7.3 onwards.
ctx.quote_char = '"';
/* arbitrarily pick 8, seems to be a reasonable number of arguments */
rv = JLI_List_new(8);