summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-08-18 20:52:42 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-08-18 20:52:42 (GMT)
commit85eabb54fe67701bec6165f67f57e5aae1f155a1 (patch)
treef107874d92fae6ae5dfba988adfb575d6471593a
parent30bf1869ff0c9e6d3441566ba63404461fef9c8c (diff)
downloadhdf5-85eabb54fe67701bec6165f67f57e5aae1f155a1.zip
hdf5-85eabb54fe67701bec6165f67f57e5aae1f155a1.tar.gz
hdf5-85eabb54fe67701bec6165f67f57e5aae1f155a1.tar.bz2
[svn-r21255] 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.
-rw-r--r--test/ntypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ntypes.c b/test/ntypes.c
index 3310a82..a63cea5 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -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 */