mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r21258] Issue 7674 - clang compiler reported an error with line 334:
temp_point->l = (unsigned long long)((i * 100 + j * 1000) * n); The value can overflow the signed int before being converted to unsigned long long. So I changed it to temp_point->l = (unsigned long long)((i * 40 + j * 400) * n); to keep it under the maximal value. Tested on jam. Simple change.
This commit is contained in:
parent
215c872226
commit
a5522454a5
@ -331,7 +331,7 @@ test_compound_dtype2(hid_t file)
|
||||
temp_point->st.c2 = (short)(i + j);
|
||||
temp_point->st.l2 = (i * 5 + j * 50) * n;
|
||||
temp_point->st.ll2 = (i * 10 + j * 100) * n;
|
||||
temp_point->l = (unsigned long long)((i * 100 + j * 1000) * n);
|
||||
temp_point->l = (unsigned long long)((i * 40 + j * 400) * n);
|
||||
} /* end for */
|
||||
} /* end for */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user