Fix test failures seen on 32-bit architectures (Fedora Raw Hide, both
i686 and armv7hl) when building with GCC 10 snapshots.
* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
(get_rev_contents): Avoid signed integer overflow on platforms with
32-bit long.
@@ -59,7 +59,8 @@ static const char *
get_rev_contents(svn_revnum_t rev, apr_pool_t *pool)
{
/* Toss in a bunch of magic numbers for spice. */
- apr_int64_t num = ((rev * 1234353 + 4358) * 4583 + ((rev % 4) << 1)) / 42;
+ apr_int64_t rev64 = rev;
+ apr_int64_t num = ((rev64 * 1234353 + 4358) * 4583 + ((rev64 % 4) << 1)) / 42;
return apr_psprintf(pool, "%" APR_INT64_T_FMT "\n", num);
}
