Skip to content

Commit 22d2f70

Browse files
avargitster
authored andcommitted
reftable tests: avoid "int" overflow, use "uint64_t"
Change code added in 1ae2b8c (reftable: add merged table view, 2021-10-07) to consistently use the "uint64_t" type. These "min" and "max" variables get passed in the body of this function to a function whose prototype is: [...] reftable_writer_set_limits([...], uint64_t min, uint64_t max This avoids the following warning on SunCC 12.5 on gcc211.fsffrance.org: "reftable/merged_test.c", line 27: warning: initializer does not fit or is out of range: 0xffffffff Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f2b2551 commit 22d2f70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reftable/merged_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ license that can be found in the LICENSE file or at
2424
static void write_test_table(struct strbuf *buf,
2525
struct reftable_ref_record refs[], int n)
2626
{
27-
int min = 0xffffffff;
28-
int max = 0;
27+
uint64_t min = 0xffffffff;
28+
uint64_t max = 0;
2929
int i = 0;
3030
int err;
3131

0 commit comments

Comments
 (0)