Use integer constants macros from stdint.h
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/13b4b045 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/13b4b045 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/13b4b045 Branch: refs/heads/c99-types Commit: 13b4b04529dcc6c14246105bf694314d639ef977 Parents: 0e6b745 Author: Nick Wellnhofer <[email protected]> Authored: Sat Nov 17 23:54:52 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Nov 18 16:36:31 2012 +0100 ---------------------------------------------------------------------- charmonizer/src/Charmonizer/Probe/Floats.c | 12 +++++----- charmonizer/src/Charmonizer/Probe/Integers.c | 4 +- charmonizer/src/Charmonizer/Test/TestIntegers.c | 16 +++++++------- charmonizer/src/Charmonizer/Test/TestLargeFiles.c | 2 +- .../runtime/core/Clownfish/Test/TestCharBuf.c | 4 +- clownfish/runtime/core/Clownfish/Test/TestNum.c | 4 +- .../core/Clownfish/Test/Util/TestNumberUtils.c | 2 +- clownfish/runtime/core/Clownfish/Util/Memory.c | 6 ++-- core/Clownfish/Util/Memory.c | 6 ++-- core/Lucy/Store/FSFileHandle.c | 8 +++--- core/Lucy/Test/Index/TestSegment.c | 2 +- core/Lucy/Test/Object/TestCharBuf.c | 4 +- core/Lucy/Test/Object/TestNum.c | 4 +- core/Lucy/Test/Search/TestSortSpec.c | 2 +- core/Lucy/Test/Store/TestFSFileHandle.c | 8 +++--- core/Lucy/Test/Store/TestInStream.c | 2 +- core/Lucy/Test/Util/TestNumberUtils.c | 2 +- 17 files changed, 44 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/charmonizer/src/Charmonizer/Probe/Floats.c ---------------------------------------------------------------------- diff --git a/charmonizer/src/Charmonizer/Probe/Floats.c b/charmonizer/src/Charmonizer/Probe/Floats.c index 6489e46..c45526b 100644 --- a/charmonizer/src/Charmonizer/Probe/Floats.c +++ b/charmonizer/src/Charmonizer/Probe/Floats.c @@ -29,12 +29,12 @@ chaz_Floats_run(void) { chaz_ConfWriter_append_conf( "typedef union { uint32_t i; float f; } chy_floatu32;\n" "typedef union { uint64_t i; double d; } chy_floatu64;\n" - "static const chy_floatu32 chy_f32inf = {CHY_U32_C(0x7f800000)};\n" - "static const chy_floatu32 chy_f32neginf = {CHY_U32_C(0xff800000)};\n" - "static const chy_floatu32 chy_f32nan = {CHY_U32_C(0x7fc00000)};\n" - "static const chy_floatu64 chy_f64inf = {CHY_U64_C(0x7ff0000000000000)};\n" - "static const chy_floatu64 chy_f64neginf = {CHY_U64_C(0xfff0000000000000)};\n" - "static const chy_floatu64 chy_f64nan = {CHY_U64_C(0x7ff8000000000000)};\n" + "static const chy_floatu32 chy_f32inf = {UINT32_C(0x7f800000)};\n" + "static const chy_floatu32 chy_f32neginf = {UINT32_C(0xff800000)};\n" + "static const chy_floatu32 chy_f32nan = {UINT32_C(0x7fc00000)};\n" + "static const chy_floatu64 chy_f64inf = {UINT64_C(0x7ff0000000000000)};\n" + "static const chy_floatu64 chy_f64neginf = {UINT64_C(0xfff0000000000000)};\n" + "static const chy_floatu64 chy_f64nan = {UINT64_C(0x7ff8000000000000)};\n" ); chaz_ConfWriter_add_def("F32_INF", "(chy_f32inf.f)"); chaz_ConfWriter_add_def("F32_NEGINF", "(chy_f32neginf.f)"); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/charmonizer/src/Charmonizer/Probe/Integers.c ---------------------------------------------------------------------- diff --git a/charmonizer/src/Charmonizer/Probe/Integers.c b/charmonizer/src/Charmonizer/Probe/Integers.c index d307ce5..f3f5dce 100644 --- a/charmonizer/src/Charmonizer/Probe/Integers.c +++ b/charmonizer/src/Charmonizer/Probe/Integers.c @@ -460,8 +460,8 @@ chaz_Integers_run(void) { else { chaz_ConfWriter_add_def( "U64_TO_DOUBLE(num)", - "((num) & CHY_U64_C(0x8000000000000000) ? " - "(double)(int64_t)((num) & CHY_U64_C(0x7FFFFFFFFFFFFFFF)) + " + "((num) & UINT64_C(0x8000000000000000) ? " + "(double)(int64_t)((num) & UINT64_C(0x7FFFFFFFFFFFFFFF)) + " "9223372036854775808.0 : " "(double)(int64_t)(num))"); } http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/charmonizer/src/Charmonizer/Test/TestIntegers.c ---------------------------------------------------------------------- diff --git a/charmonizer/src/Charmonizer/Test/TestIntegers.c b/charmonizer/src/Charmonizer/Test/TestIntegers.c index 14949c0..7f5d549 100644 --- a/charmonizer/src/Charmonizer/Test/TestIntegers.c +++ b/charmonizer/src/Charmonizer/Test/TestIntegers.c @@ -89,24 +89,24 @@ S_run_tests(TestBatch *batch) { OK((bar == 4000000000UL), "uint32_t is unsigned"); OK((sizeof(int32_t) == 4), "int32_t is 4 bytes"); OK((sizeof(uint32_t) == 4), "uint32_t is 4 bytes"); - OK((INT32_MAX == I32_C(2147483647)), "INT32_MAX"); + OK((INT32_MAX == INT32_C(2147483647)), "INT32_MAX"); /* The (-2147483647 - 1) avoids a compiler warning. */ - OK((INT32_MIN == I32_C(-2147483647 - 1)), "INT32_MIN"); - OK((UINT32_MAX == U32_C(4294967295)), "UINT32_MAX"); + OK((INT32_MIN == -INT32_C(2147483647) - 1), "INT32_MIN"); + OK((UINT32_MAX == UINT32_C(4294967295)), "UINT32_MAX"); } #endif #ifdef HAS_I64_T { char buf[100]; int64_t foo = -100; - uint64_t bar = U64_C(18000000000000000000); + uint64_t bar = UINT64_C(18000000000000000000); OK((foo == -100), "int64_t is signed"); - OK((bar == U64_C(18000000000000000000)), "uint64_t is unsigned"); + OK((bar == UINT64_C(18000000000000000000)), "uint64_t is unsigned"); OK((sizeof(int64_t) == 8), "int64_t is 8 bytes"); OK((sizeof(uint64_t) == 8), "uint64_t is 8 bytes"); - OK((INT64_MAX == I64_C(0x7FFFFFFFFFFFFFFF)), "INT64_MAX"); - OK((INT64_MIN == -I64_C(0x7FFFFFFFFFFFFFFF) - 1), "INT64_MIN"); - OK((UINT64_MAX == U64_C(0xFFFFFFFFFFFFFFFF)), "UINT64_MAX"); + OK((INT64_MAX == INT64_C(0x7FFFFFFFFFFFFFFF)), "INT64_MAX"); + OK((INT64_MIN == -INT64_C(0x7FFFFFFFFFFFFFFF) - 1), "INT64_MIN"); + OK((UINT64_MAX == UINT64_C(0xFFFFFFFFFFFFFFFF)), "UINT64_MAX"); sprintf(buf, "%"I64P, foo); STR_EQ(buf, "-100", "I64P"); sprintf(buf, "%"U64P, bar); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/charmonizer/src/Charmonizer/Test/TestLargeFiles.c ---------------------------------------------------------------------- diff --git a/charmonizer/src/Charmonizer/Test/TestLargeFiles.c b/charmonizer/src/Charmonizer/Test/TestLargeFiles.c index 663a313..d6c317a 100644 --- a/charmonizer/src/Charmonizer/Test/TestLargeFiles.c +++ b/charmonizer/src/Charmonizer/Test/TestLargeFiles.c @@ -248,7 +248,7 @@ S_can_create_big_files(void) { } else { /* Bail unless seek succeeds. */ - int64_t check_seek = fseeko64(fh, I64_C(5000000000), SEEK_SET); + int64_t check_seek = fseeko64(fh, INT64_C(5000000000), SEEK_SET); if (check_seek != -1) { /* Bail unless we write successfully. */ if (fprintf(fh, "X") == 1) { http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c b/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c index f478772..afefbea 100644 --- a/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c +++ b/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c @@ -313,7 +313,7 @@ test_vcatf_i32(TestBatch *batch) { static void test_vcatf_i64(TestBatch *batch) { CharBuf *wanted = S_get_cb("foo bar -5000000000 baz"); - int64_t num = I64_C(-5000000000); + int64_t num = INT64_C(-5000000000); CharBuf *got = S_get_cb("foo "); CB_catf(got, "bar %i64 baz", num); TEST_TRUE(batch, CB_Equals(wanted, (Obj*)got), "%%i64"); @@ -346,7 +346,7 @@ test_vcatf_u32(TestBatch *batch) { static void test_vcatf_u64(TestBatch *batch) { CharBuf *wanted = S_get_cb("foo bar 5000000000 baz"); - uint64_t num = U64_C(5000000000); + uint64_t num = UINT64_C(5000000000); CharBuf *got = S_get_cb("foo "); CB_catf(got, "bar %u64 baz", num); TEST_TRUE(batch, CB_Equals(wanted, (Obj*)got), "%%u64"); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/clownfish/runtime/core/Clownfish/Test/TestNum.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/core/Clownfish/Test/TestNum.c b/clownfish/runtime/core/Clownfish/Test/TestNum.c index 3d85523..f2c3252 100644 --- a/clownfish/runtime/core/Clownfish/Test/TestNum.c +++ b/clownfish/runtime/core/Clownfish/Test/TestNum.c @@ -181,8 +181,8 @@ test_Equals_and_Compare_To(TestBatch *batch) { TEST_TRUE(batch, Int32_Compare_To(i32, (Obj*)f32) < 0, "Integer32 comparison to Float32"); - Int64_Set_Value(i64, I64_C(0x6666666666666666)); - Integer64 *i64_copy = Int64_new(I64_C(0x6666666666666666)); + Int64_Set_Value(i64, INT64_C(0x6666666666666666)); + Integer64 *i64_copy = Int64_new(INT64_C(0x6666666666666666)); TEST_TRUE(batch, Int64_Compare_To(i64, (Obj*)i64_copy) == 0, "Integer64 comparison to same number"); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/clownfish/runtime/core/Clownfish/Test/Util/TestNumberUtils.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/core/Clownfish/Test/Util/TestNumberUtils.c b/clownfish/runtime/core/Clownfish/Test/Util/TestNumberUtils.c index eba8fdc..0124a6c 100644 --- a/clownfish/runtime/core/Clownfish/Test/Util/TestNumberUtils.c +++ b/clownfish/runtime/core/Clownfish/Test/Util/TestNumberUtils.c @@ -224,7 +224,7 @@ test_bigend_u16(TestBatch *batch) { static void test_bigend_u32(TestBatch *batch) { size_t count = 32; - uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, U64_C(1) + UINT32_MAX); + uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, UINT64_C(1) + UINT32_MAX); size_t amount = (count + 1) * sizeof(uint32_t); char *allocated = (char*)CALLOCATE(amount, sizeof(char)); char *encoded = allocated + 1; // Intentionally misaligned. http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/clownfish/runtime/core/Clownfish/Util/Memory.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/core/Clownfish/Util/Memory.c b/clownfish/runtime/core/Clownfish/Util/Memory.c index 486d0e1..72754b2 100644 --- a/clownfish/runtime/core/Clownfish/Util/Memory.c +++ b/clownfish/runtime/core/Clownfish/Util/Memory.c @@ -77,13 +77,13 @@ Memory_oversize(size_t minimum, size_t width) { if (sizeof(size_t) == 8) { // 64-bit switch (width) { case 1: - amount = (amount + 7) & CHY_I64_C(0xFFFFFFFFFFFFFFF8); + amount = (amount + 7) & INT64_C(0xFFFFFFFFFFFFFFF8); break; case 2: - amount = (amount + 3) & CHY_I64_C(0xFFFFFFFFFFFFFFFC); + amount = (amount + 3) & INT64_C(0xFFFFFFFFFFFFFFFC); break; case 4: - amount = (amount + 1) & CHY_I64_C(0xFFFFFFFFFFFFFFFE); + amount = (amount + 1) & INT64_C(0xFFFFFFFFFFFFFFFE); break; default: break; http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Clownfish/Util/Memory.c ---------------------------------------------------------------------- diff --git a/core/Clownfish/Util/Memory.c b/core/Clownfish/Util/Memory.c index 486d0e1..72754b2 100644 --- a/core/Clownfish/Util/Memory.c +++ b/core/Clownfish/Util/Memory.c @@ -77,13 +77,13 @@ Memory_oversize(size_t minimum, size_t width) { if (sizeof(size_t) == 8) { // 64-bit switch (width) { case 1: - amount = (amount + 7) & CHY_I64_C(0xFFFFFFFFFFFFFFF8); + amount = (amount + 7) & INT64_C(0xFFFFFFFFFFFFFFF8); break; case 2: - amount = (amount + 3) & CHY_I64_C(0xFFFFFFFFFFFFFFFC); + amount = (amount + 3) & INT64_C(0xFFFFFFFFFFFFFFFC); break; case 4: - amount = (amount + 1) & CHY_I64_C(0xFFFFFFFFFFFFFFFE); + amount = (amount + 1) & INT64_C(0xFFFFFFFFFFFFFFFE); break; default: break; http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Store/FSFileHandle.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Store/FSFileHandle.c b/core/Lucy/Store/FSFileHandle.c index 64f4f4a..a34bddd 100644 --- a/core/Lucy/Store/FSFileHandle.c +++ b/core/Lucy/Store/FSFileHandle.c @@ -111,7 +111,7 @@ FSFH_do_open(FSFileHandle *self, const CharBuf *path, uint32_t flags) { } else { // Derive length. - self->len = lseek64(self->fd, I64_C(0), SEEK_END); + self->len = lseek64(self->fd, INT64_C(0), SEEK_END); if (self->len == -1) { Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s", self->path, strerror(errno)))); @@ -119,7 +119,7 @@ FSFH_do_open(FSFileHandle *self, const CharBuf *path, uint32_t flags) { return NULL; } else { - int64_t check_val = lseek64(self->fd, I64_C(0), SEEK_SET); + int64_t check_val = lseek64(self->fd, INT64_C(0), SEEK_SET); if (check_val == -1) { Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s", self->path, strerror(errno)))); @@ -326,14 +326,14 @@ SI_init_read_only(FSFileHandle *self) { } // Derive len. - self->len = lseek64(self->fd, I64_C(0), SEEK_END); + self->len = lseek64(self->fd, INT64_C(0), SEEK_END); if (self->len == -1) { Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s", self->path, strerror(errno)))); return false; } else { - int64_t check_val = lseek64(self->fd, I64_C(0), SEEK_SET); + int64_t check_val = lseek64(self->fd, INT64_C(0), SEEK_SET); if (check_val == -1) { Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s", self->path, strerror(errno)))); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Index/TestSegment.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Index/TestSegment.c b/core/Lucy/Test/Index/TestSegment.c index 6d164bc..80e2503 100644 --- a/core/Lucy/Test/Index/TestSegment.c +++ b/core/Lucy/Test/Index/TestSegment.c @@ -71,7 +71,7 @@ static void test_seg_name_and_num(TestBatch *batch) { Segment *segment_z = Seg_new(35); CharBuf *seg_z_name = Seg_num_to_name(35); - TEST_TRUE(batch, Seg_Get_Number(segment_z) == I64_C(35), "Get_Number"); + TEST_TRUE(batch, Seg_Get_Number(segment_z) == INT64_C(35), "Get_Number"); TEST_TRUE(batch, CB_Equals_Str(Seg_Get_Name(segment_z), "seg_z", 5), "Get_Name"); TEST_TRUE(batch, CB_Equals_Str(seg_z_name, "seg_z", 5), http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Object/TestCharBuf.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Object/TestCharBuf.c b/core/Lucy/Test/Object/TestCharBuf.c index d4f6196..6a71cf3 100644 --- a/core/Lucy/Test/Object/TestCharBuf.c +++ b/core/Lucy/Test/Object/TestCharBuf.c @@ -309,7 +309,7 @@ test_vcatf_i32(TestBatch *batch) { static void test_vcatf_i64(TestBatch *batch) { CharBuf *wanted = S_get_cb("foo bar -5000000000 baz"); - int64_t num = I64_C(-5000000000); + int64_t num = INT64_C(-5000000000); CharBuf *got = S_get_cb("foo "); CB_catf(got, "bar %i64 baz", num); TEST_TRUE(batch, CB_Equals(wanted, (Obj*)got), "%%i64"); @@ -342,7 +342,7 @@ test_vcatf_u32(TestBatch *batch) { static void test_vcatf_u64(TestBatch *batch) { CharBuf *wanted = S_get_cb("foo bar 5000000000 baz"); - uint64_t num = U64_C(5000000000); + uint64_t num = UINT64_C(5000000000); CharBuf *got = S_get_cb("foo "); CB_catf(got, "bar %u64 baz", num); TEST_TRUE(batch, CB_Equals(wanted, (Obj*)got), "%%u64"); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Object/TestNum.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Object/TestNum.c b/core/Lucy/Test/Object/TestNum.c index 66583c8..0d04acb 100644 --- a/core/Lucy/Test/Object/TestNum.c +++ b/core/Lucy/Test/Object/TestNum.c @@ -177,8 +177,8 @@ test_Equals_and_Compare_To(TestBatch *batch) { TEST_TRUE(batch, Int32_Compare_To(i32, (Obj*)f32) < 0, "Integer32 comparison to Float32"); - Int64_Set_Value(i64, I64_C(0x6666666666666666)); - Integer64 *i64_copy = Int64_new(I64_C(0x6666666666666666)); + Int64_Set_Value(i64, INT64_C(0x6666666666666666)); + Integer64 *i64_copy = Int64_new(INT64_C(0x6666666666666666)); TEST_TRUE(batch, Int64_Compare_To(i64, (Obj*)i64_copy) == 0, "Integer64 comparison to same number"); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Search/TestSortSpec.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Search/TestSortSpec.c b/core/Lucy/Test/Search/TestSortSpec.c index b017570..8364944 100644 --- a/core/Lucy/Test/Search/TestSortSpec.c +++ b/core/Lucy/Test/Search/TestSortSpec.c @@ -282,7 +282,7 @@ S_random_int32() { static Obj* S_random_int64() { uint64_t num = TestUtils_random_u64(); - return (Obj*)Int64_new(num & I64_C(0x7FFFFFFFFFFFFFFF)); + return (Obj*)Int64_new(num & INT64_C(0x7FFFFFFFFFFFFFFF)); } static Obj* http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Store/TestFSFileHandle.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Store/TestFSFileHandle.c b/core/Lucy/Test/Store/TestFSFileHandle.c index 905d348..84dd3e1 100644 --- a/core/Lucy/Test/Store/TestFSFileHandle.c +++ b/core/Lucy/Test/Store/TestFSFileHandle.c @@ -107,11 +107,11 @@ test_Read_Write(TestBatch *batch) { fh = FSFH_open(test_filename, FH_CREATE | FH_WRITE_ONLY | FH_EXCLUSIVE); - TEST_TRUE(batch, FSFH_Length(fh) == I64_C(0), "Length initially 0"); + TEST_TRUE(batch, FSFH_Length(fh) == INT64_C(0), "Length initially 0"); TEST_TRUE(batch, FSFH_Write(fh, foo, 3), "Write returns success"); - TEST_TRUE(batch, FSFH_Length(fh) == I64_C(3), "Length after Write"); + TEST_TRUE(batch, FSFH_Length(fh) == INT64_C(3), "Length after Write"); TEST_TRUE(batch, FSFH_Write(fh, bar, 3), "Write returns success"); - TEST_TRUE(batch, FSFH_Length(fh) == I64_C(6), "Length after 2 Writes"); + TEST_TRUE(batch, FSFH_Length(fh) == INT64_C(6), "Length after 2 Writes"); Err_set_error(NULL); TEST_FALSE(batch, FSFH_Read(fh, buf, 0, 2), @@ -125,7 +125,7 @@ test_Read_Write(TestBatch *batch) { Err_set_error(NULL); fh = FSFH_open(test_filename, FH_READ_ONLY); - TEST_TRUE(batch, FSFH_Length(fh) == I64_C(6), "Length on Read"); + TEST_TRUE(batch, FSFH_Length(fh) == INT64_C(6), "Length on Read"); TEST_TRUE(batch, FSFH_Read(fh, buf, 0, 6), "Read returns success"); TEST_TRUE(batch, strncmp(buf, "foobar", 6) == 0, "Read/Write"); TEST_TRUE(batch, FSFH_Read(fh, buf, 2, 3), "Read returns success"); http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Store/TestInStream.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Store/TestInStream.c b/core/Lucy/Test/Store/TestInStream.c index 5b594c2..586b106 100644 --- a/core/Lucy/Test/Store/TestInStream.c +++ b/core/Lucy/Test/Store/TestInStream.c @@ -145,7 +145,7 @@ test_Close(TestBatch *batch) { static void test_Seek_and_Tell(TestBatch *batch) { - int64_t gb1 = I64_C(0x40000000); + int64_t gb1 = INT64_C(0x40000000); int64_t gb3 = gb1 * 3; int64_t gb6 = gb1 * 6; int64_t gb12 = gb1 * 12; http://git-wip-us.apache.org/repos/asf/lucy/blob/13b4b045/core/Lucy/Test/Util/TestNumberUtils.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Util/TestNumberUtils.c b/core/Lucy/Test/Util/TestNumberUtils.c index a0f7552..d09ffab 100644 --- a/core/Lucy/Test/Util/TestNumberUtils.c +++ b/core/Lucy/Test/Util/TestNumberUtils.c @@ -221,7 +221,7 @@ test_bigend_u16(TestBatch *batch) { static void test_bigend_u32(TestBatch *batch) { size_t count = 32; - uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, U64_C(1) + UINT32_MAX); + uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, UINT64_C(1) + UINT32_MAX); size_t amount = (count + 1) * sizeof(uint32_t); char *allocated = (char*)CALLOCATE(amount, sizeof(char)); char *encoded = allocated + 1; // Intentionally misaligned.
