diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2016-05-09 12:42:45 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-18 18:24:41 -0400 |
commit | ab154b1b80c185bf0b11731f0bd6d872177b352a (patch) | |
tree | c56a9ce1b2ace961aaa512601a940562bbf6cc9c /src/import/hwpf/fapi2/include/variable_buffer.H | |
parent | 3f343daf0899f6d06a5d0035604e9599bba81979 (diff) | |
download | talos-hostboot-ab154b1b80c185bf0b11731f0bd6d872177b352a.tar.gz talos-hostboot-ab154b1b80c185bf0b11731f0bd6d872177b352a.zip |
Fix assert() in variable_buffer
-Updated code to use fapi2::Assert instead of assert()
Change-Id: I5184f1f41c7b0568fac8d98e6b38d4de1b76269f
RTC:128525
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24261
Tested-by: Jenkins Server
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Tested-by: PPE CI
Tested-by: Hostboot CI
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24264
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2/include/variable_buffer.H')
-rw-r--r-- | src/import/hwpf/fapi2/include/variable_buffer.H | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/import/hwpf/fapi2/include/variable_buffer.H b/src/import/hwpf/fapi2/include/variable_buffer.H index 67de22c5c..5680370b8 100644 --- a/src/import/hwpf/fapi2/include/variable_buffer.H +++ b/src/import/hwpf/fapi2/include/variable_buffer.H @@ -27,10 +27,14 @@ #include <buffer_parameters.H> #include <buffer_traits.H> #include <return_code_defs.H> -#include <cassert> namespace fapi2 { + +// forward fapi2::Assert() +extern void Assert(bool); + + /// @brief Get a 32 bit mask quickly // This is one of the main reasons we static_assert in the ctor's // to ensure the unit_type is 32 bits. @@ -377,7 +381,7 @@ class variable_buffer ReturnCodes rc; // make sure we stay within our container - assert((L > 0) && ((SB + L) <= this->iv_perceived_bit_length) ); + fapi2::Assert((L > 0) && ((SB + L) <= this->iv_perceived_bit_length) ); uint32_t mask = 0; @@ -494,7 +498,7 @@ class variable_buffer inline bool isBitSet( bits_type SB, bits_type L = 1 ) const { // make sure we stay within our container - assert( ((L > 0) && ((SB + L) <= this->iv_perceived_bit_length)) ); + fapi2::Assert( ((L > 0) && ((SB + L) <= this->iv_perceived_bit_length)) ); bool is_set = false; uint32_t mask = 0; |