Commit: 5320a0ad9b30a3c939221d2562c6ce686e51e2a2
Author: Mike Erwin
Date:   Wed Aug 10 02:38:51 2016 -0400
Branches: blender2.8
https://developer.blender.org/rB5320a0ad9b30a3c939221d2562c6ce686e51e2a2

Gawain: fix compiler warnings

properly typed function parameters
pointer casting & arithmetic
ptrdiff_t formatting

===================================================================

M       source/blender/gpu/intern/gpu_immediate.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_immediate.c 
b/source/blender/gpu/intern/gpu_immediate.c
index b08484e..c838581 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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to