GNOME Bugzilla – Bug 740605
Fix Build In gdkgl.c (Avoid GCCism In Pointer Arithmetic)
Last modified: 2014-11-24 15:01:02 UTC
Hi, In commit 6ffba86 there was a line that was added: glVertexAttribPointer (program->uv_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, NULL + sizeof(float) * 2); As compilers like Visual Studio, and possibly others, see NULL-plus-something as adding something to a void * in pointer arithmetic, the build fails as doing so is non-standard and is a GCCism. Instead, I think we could achieve the same results by doing (void *) (sizeof(float) * 2) for the 6th argument to the glVertexAttribPointer() call to fix this. I will enclose a patch for this shortly.
Created attachment 291334 [details] [review] gdkgl.c: Avoid GCCism In Pointer Arithmetic Hi, Here comes the patch. With blessings, thank you!
Review of attachment 291334 [details] [review]: looks good
Review of attachment 291334 [details] [review]: Hello Matthias, Thanks for the review, the patch was pushed as 16e863c. I will close this bug shortly. With blessings, thank you!