[rhmessaging-commits] rhmessaging commits: r2651 - store/trunk/cpp/tests/jrnl.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Fri Oct 17 15:10:47 EDT 2008


Author: kpvdr
Date: 2008-10-17 15:10:47 -0400 (Fri, 17 Oct 2008)
New Revision: 2651

Modified:
   store/trunk/cpp/tests/jrnl/_ut_lfmgr.cpp
Log:
added static casts to satisfy older compilers on type conversion issues

Modified: store/trunk/cpp/tests/jrnl/_ut_lfmgr.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_ut_lfmgr.cpp	2008-10-17 19:09:35 UTC (rev 2650)
+++ store/trunk/cpp/tests/jrnl/_ut_lfmgr.cpp	2008-10-17 19:10:47 UTC (rev 2651)
@@ -335,8 +335,9 @@
             unsigned j = ae_max_jfiles ? ae_max_jfiles : JRNL_MAX_NUM_FILES;
             while (ae && j > num_jfiles)
             {
-                const u_int16_t posn = (lm.num_jfiles() - 1) * ::drand48();
-                const u_int16_t incr = 1 + (lm.ae_jfiles_rem() > 4 ? 3 : lm.ae_jfiles_rem() - 1) * ::drand48();
+                const u_int16_t posn = static_cast<u_int16_t>((lm.num_jfiles() - 1) * ::drand48());
+                const u_int16_t incr = 1 + static_cast<u_int16_t>((lm.ae_jfiles_rem() > 4
+                        ? 3 : lm.ae_jfiles_rem() - 1) * ::drand48());
                 check_insert(lfm, lm, jc, posn, incr);
                 j -= incr;
             }




More information about the rhmessaging-commits mailing list