From 2975cbeac91ff0c190582a4e9fc3246a513afd21 Mon Sep 17 00:00:00 2001 From: Brian Silver Date: Wed, 27 May 2015 10:44:06 -0500 Subject: Ensure FFDC return code is set even if using empty classes Change-Id: I04d80f91b9ccdf5ce0aaf920770458e7d015b971 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17984 Tested-by: Jenkins Server Reviewed-by: Matt K. Light Reviewed-by: Thi N. Tran Reviewed-by: Brian Silver --- src/import/hwpf/fapi2/tools/parseErrorInfo.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/import/hwpf/fapi2') diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl index bbef07752..61b6c96db 100755 --- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl @@ -1173,8 +1173,12 @@ foreach my $argnum (0 .. $#ARGV) else { # Void expression keeps the compiler from complaining about the unused arguments. + # We want to set the i_rc to the RC if we're empty. This otherwise gets done in _setHwpError() print ECFILE " $class_name(fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE, fapi2::ReturnCode& i_rc = fapi2::current_err)\n"; - print ECFILE " {static_cast(i_sev); static_cast(i_rc);}\n\n"; + print ECFILE " {\n"; + print ECFILE " static_cast(i_sev);\n"; + print ECFILE " i_rc = $err->{rc};\n"; + print ECFILE " }\n\n"; } # Methods @@ -1190,13 +1194,15 @@ foreach my $argnum (0 .. $#ARGV) if ($arg_empty_ffdc eq undef) { print ECFILE " {\n"; - print ECFILE " FAPI_SET_HWP_ERROR(iv_rc, $err->{rc});\n" if ($arg_empty_ffdc eq undef); - print ECFILE " fapi2::logError(iv_rc, (i_sev == fapi2::FAPI2_ERRL_SEV_UNDEFINED) ? iv_sev : i_sev);\n" if ($arg_empty_ffdc eq undef); + print ECFILE " FAPI_SET_HWP_ERROR(iv_rc, $err->{rc});\n"; + print ECFILE " fapi2::logError(iv_rc, (i_sev == fapi2::FAPI2_ERRL_SEV_UNDEFINED) ? iv_sev : i_sev);\n"; print ECFILE " }\n\n"; } else { - print ECFILE " {static_cast(i_sev);}\n\n"; + print ECFILE " {\n"; + print ECFILE " static_cast(i_sev);\n"; + print ECFILE " }\n\n"; } # Instance variables -- cgit v1.2.3