diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-08-10 09:38:51 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-08-10 09:38:51 +0300 |
commit | 5320a0ad9b30a3c939221d2562c6ce686e51e2a2 (patch) | |
tree | a86501906ccec298a468d292dfb541779d348c31 /source/blender/gpu/intern/gpu_immediate.c | |
parent | e4e1b0c7d353d1c37ef88cd1670001974e717841 (diff) |
Gawain: fix compiler warnings
properly typed function parameters
pointer casting & arithmetic
ptrdiff_t formatting
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c index b08484ea134..c8385810237 100644 --- a/source/blender/gpu/intern/gpu_immediate.c +++ b/source/blender/gpu/intern/gpu_immediate.c @@ -108,7 +108,7 @@ static unsigned padding(unsigned offset, unsigned alignment) } #if PACK_DEBUG -static void show_pack(a_idx, sz, pad) +static void show_pack(unsigned a_idx, unsigned sz, unsigned pad) { const char c = 'A' + a_idx; for (unsigned i = 0; i < pad; ++i) @@ -435,7 +435,7 @@ void immAttrib1f(unsigned attrib_id, float x) setAttribValueBit(attrib_id); float* data = (float*)(imm.vertex_data + attrib->offset); -// printf("%s %ld %p\n", __FUNCTION__, (void*)data - imm.buffer_data, data); +// printf("%s %td %p\n", __FUNCTION__, (GLubyte*)data - imm.buffer_data, data); data[0] = x; } @@ -455,7 +455,7 @@ void immAttrib2f(unsigned attrib_id, float x, float y) setAttribValueBit(attrib_id); float* data = (float*)(imm.vertex_data + attrib->offset); -// printf("%s %ld %p\n", __FUNCTION__, (void*)data - imm.buffer_data, data); +// printf("%s %td %p\n", __FUNCTION__, (GLubyte*)data - imm.buffer_data, data); data[0] = x; data[1] = y; @@ -476,7 +476,7 @@ void immAttrib3f(unsigned attrib_id, float x, float y, float z) setAttribValueBit(attrib_id); float* data = (float*)(imm.vertex_data + attrib->offset); -// printf("%s %ld %p\n", __FUNCTION__, (void*)data - imm.buffer_data, data); +// printf("%s %td %p\n", __FUNCTION__, (GLubyte*)data - imm.buffer_data, data); data[0] = x; data[1] = y; @@ -498,7 +498,7 @@ void immAttrib3ub(unsigned attrib_id, unsigned char r, unsigned char g, unsigned setAttribValueBit(attrib_id); GLubyte* data = imm.vertex_data + attrib->offset; -// printf("%s %ld %p\n", __FUNCTION__, (void*)data - imm.buffer_data, data); +// printf("%s %td %p\n", __FUNCTION__, data - imm.buffer_data, data); data[0] = r; data[1] = g; @@ -520,7 +520,7 @@ void immAttrib4ub(unsigned attrib_id, unsigned char r, unsigned char g, unsigned setAttribValueBit(attrib_id); GLubyte* data = imm.vertex_data + attrib->offset; -// printf("%s %ld %p\n", __FUNCTION__, (void*)data - imm.buffer_data, data); +// printf("%s %td %p\n", __FUNCTION__, data - imm.buffer_data, data); data[0] = r; data[1] = g; |