diff options
author | Brian Silver <bsilver@us.ibm.com> | 2015-05-27 10:44:06 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2016-08-01 00:25:15 -0400 |
commit | d8c6bd6381b9be71a0e71f14c04c2aea99c6a376 (patch) | |
tree | 05d6678be8c5d87b57d1c7be4233b8eca256ab81 | |
parent | 1e4417bd995a6bf4cb8d4c09cf59ec99c45a37d8 (diff) | |
download | talos-sbe-d8c6bd6381b9be71a0e71f14c04c2aea99c6a376.tar.gz talos-sbe-d8c6bd6381b9be71a0e71f14c04c2aea99c6a376.zip |
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 <mklight@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Brian Silver <bsilver@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27627
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
-rwxr-xr-x | import/hwpf/fapi2/tools/parseErrorInfo.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/import/hwpf/fapi2/tools/parseErrorInfo.pl b/import/hwpf/fapi2/tools/parseErrorInfo.pl index bbef0775..61b6c96d 100755 --- a/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/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<void>(i_sev); static_cast<void>(i_rc);}\n\n"; + print ECFILE " {\n"; + print ECFILE " static_cast<void>(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<void>(i_sev);}\n\n"; + print ECFILE " {\n"; + print ECFILE " static_cast<void>(i_sev);\n"; + print ECFILE " }\n\n"; } # Instance variables |