RFR(XXS): 8161951: 8132379 introduced non ANSI C coding

Volker Simonis volker.simonis at gmail.com
Wed Jul 20 18:49:14 UTC 2016


can somebody please review the following trivial fix:


Change '8132379: -J options can cause crash or "Warning: app args
parsing error passing arguments as-is"' uses the following non ANSI C
compatible code for declaring a block-level variable:

    for (i = 0; i < argc; i++) {
        j = appArgIdx[i];
        jboolean arg_expand = (JLI_StrCmp(stdargs[j].arg, strv[i]) == 0)
                                ? stdargs[j].has_wildcard
                                : JNI_FALSE;

But ANSI C only allows the declaration of block local variable at the
beginning of a block.

As the fix is trivial, it makes no sense to restrict ourselves to
compilers which support this C99 feature (e.g. > VS2012).

Thank you and best regards,

More information about the core-libs-dev mailing list