From: ShadowNinja Date: Mon, 4 May 2015 23:59:36 +0000 (-0400) Subject: Fix GCC compiler warning X-Git-Tag: 0.4.13~308 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dfd790930c8c1464ead730999c3ac9677d130360;p=oweals%2Fminetest.git Fix GCC compiler warning --- diff --git a/src/unittest/test_random.cpp b/src/unittest/test_random.cpp index 81cf9ae28..20cfca334 100644 --- a/src/unittest/test_random.cpp +++ b/src/unittest/test_random.cpp @@ -173,8 +173,8 @@ void TestRandom::testPcgRandomNormalDist() UASSERT(ubound <= max); int accum = 0; - for (int i = lbound; i != ubound; i++) - accum += bins[i - min]; + for (int j = lbound; j != ubound; j++) + accum += bins[j - min]; float actual = (float)accum / num_samples; UASSERT(fabs(actual - prediction_intervals[i]) < 0.02);