From a1d2ab2061e37f6fc8139f33ae6bd6eecc6f734c Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Tue, 3 Sep 2024 14:23:17 -0700 Subject: [PATCH] Used local pre-commit --- tests/TestInt32.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/TestInt32.cc b/tests/TestInt32.cc index cc7b8cf95..6aa061e7c 100644 --- a/tests/TestInt32.cc +++ b/tests/TestInt32.cc @@ -86,13 +86,14 @@ bool TestInt32::read() { // jhrg 3/12/14 // d_buf = d_buf * 32; // - //d_buf <<= 5; - //if (!d_buf) + // d_buf <<= 5; + // if (!d_buf) // d_buf = 32; - // The above version caused runtime errors on OSX 14.6.1: + // The above version caused runtime errors on OSX 14.6.1: // - //. +TestInt32.cc:88:15: runtime error: left shift of 1073741824 by 5 places cannot be represented in type 'dods_int32' (aka 'int') - // +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior TestInt32.cc:88:15 in + //. +TestInt32.cc:88:15: runtime error: left shift of 1073741824 by 5 places cannot be represented in type + //'dods_int32' (aka 'int') + // +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior TestInt32.cc:88:15 in // // Replaced with a slower but cautious version below - ndp 09/3/2024 long long val = d_buf; @@ -103,7 +104,7 @@ bool TestInt32::read() { d_buf = 0xFFFFFFFF & val; } DBGN(cerr << __PRETTY_FUNCTION__ << "d_buf: " << d_buf << endl); - + } else { d_buf = 123456789; }