Changeset 1881


Ignore:
Timestamp:
Sep 5, 2012, 10:08:38 PM (7 years ago)
Author:
sam
Message:

gpu: fix a few minor compiler warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/vertexbuffer.cpp

    r1864 r1881  
    209209    case MeshPrimitive::Triangles:
    210210        /* FIXME: ignores most of the arguments! */
     211        (void)vbase; (void)vskip; (void)vcount; (void)skip;
    211212        glDrawElements(GL_TRIANGLES, count * 3, GL_UNSIGNED_SHORT, 0);
    212213        break;
    213214    case MeshPrimitive::Points:
    214215        /* FIXME: ignores most of the arguments! */
     216        (void)vbase; (void)vskip; (void)vcount; (void)skip;
    215217        glDrawElements(GL_POINTS, count, GL_UNSIGNED_SHORT, 0);
    216218        break;
     
    284286
    285287    /* Find the stream number */
    286     int usage_index = 0, stream = -1;
     288    uint32_t usage_index = 0;
     289    int stream = -1;
    287290    for (int i = 0; i < m_count; i++)
    288291        if (m_streams[i].usage == usage)
     
    339342         * the information. It sucks. */
    340343
    341         int attr_index = 0, usage_index = 0;
     344        int attr_index = 0;
    342345        /* First, find the stream index */
    343         for (; attr_index < m_count; attr_index++)
     346        for (uint32_t usage_index = 0; attr_index < m_count; attr_index++)
    344347            if (m_streams[attr_index].usage == usage)
    345348                if (usage_index++ == index)
     
    386389
    387390        int type_index = m_streams[attr_index].stream_type;
    388         if (type_index < 0 || type_index >= sizeof(tlut) / sizeof(*tlut))
     391        if (type_index < 0 || type_index >= (int)(sizeof(tlut) / sizeof(*tlut)))
    389392            type_index = 0;
    390393
     
    589592    return ret;
    590593#else
     594    /* FIXME: is there a way to use "size"? */
     595    (void)size;
    591596    return m_data->m_memory + offset;
    592597#endif
Note: See TracChangeset for help on using the changeset viewer.