Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge "Fix undefined left shifting of negative numbers" (#338) to hdf5_1_10 #370

Merged
merged 7 commits into from
Feb 23, 2021
4 changes: 2 additions & 2 deletions test/dsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -4041,7 +4041,7 @@ test_nbit_compound_2(hid_t file)
power = HDpow(2.0F, (double)(precision[1] - 1));
orig_data[i][j].a.c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
power = HDpow(2.0F, (double)(precision[2] - 1));
orig_data[i][j].a.s = (short)(-((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].a.s = (short)(-(((long long)HDrandom() % (long long)power) << offset[2]));
orig_data[i][j].a.f = float_val[i][j];

power = HDpow(2.0F, (double)precision[3]);
Expand All @@ -4057,7 +4057,7 @@ test_nbit_compound_2(hid_t file)
for (n = 0; n < (size_t)array_dims[1]; n++) {
power = HDpow(2.0F, (double)(precision[0] - 1));
orig_data[i][j].d[m][n].i =
(int)(-((long long)HDrandom() % (long long)power) << offset[0]);
(int)(-(((long long)HDrandom() % (long long)power) << offset[0]));
power = HDpow(2.0F, (double)(precision[1] - 1));
orig_data[i][j].d[m][n].c =
(char)(((long long)HDrandom() % (long long)power) << offset[1]);
Expand Down