Ignore:
Timestamp:
May 20, 2012, 2:30:18 PM (8 years ago)
Author:
sam
Message:

math: fix minor compiler warnings that appeared with g++ 4.7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/math/half.cpp

    r1188 r1402  
    4747    static uint16_t const basetable[512] =
    4848    {
    49 #define S1(i) (((i) < 103) ? 0x0000 : \
    50                ((i) < 113) ? 0x0400 >> (0x1f & (113 - (i))) : \
    51                ((i) < 143) ? ((i) - 112) << 10 : 0x7c00)
     49#define S1(i) (((i) < 103) ? 0x0000u : \
     50               ((i) < 113) ? 0x0400u >> (0x1f & (113 - (i))) : \
     51               ((i) < 143) ? ((i) - 112) << 10 : 0x7c00u)
    5252        S256(0),
    5353#undef S1
    54 #define S1(i) (0x8000 | basetable[i])
     54#define S1(i) (uint16_t)(0x8000u | basetable[i])
    5555        S256(0),
    5656#undef S1
     
    117117 * http://lol.zoy.org/blog/2012/4/3/beyond-de-bruijn for an explanation
    118118 * of how the value 0x5a1a1a2u was obtained. */
    119 static int const shifttable[16] =
    120 {
    121     23, 22, 21, 15, -1, 20, 18, 14, 14, 16, 19, -1, 17, -1, -1, -1,
     119static uint32_t const shifttable[16] =
     120{
     121    23, 22, 21, 15, 0, 20, 18, 14, 14, 16, 19, 0, 17, 0, 0, 0,
    122122};
    123123static uint32_t const shiftmagic = 0x5a1a1a2u;
Note: See TracChangeset for help on using the changeset viewer.