[gtk+/master.fcw: 1/648] gdkgl.c: Avoid GCCism in Pointer Arithmetic
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/master.fcw: 1/648] gdkgl.c: Avoid GCCism in Pointer Arithmetic
- Date: Wed, 4 Feb 2015 05:05:13 +0000 (UTC)
commit 5856ee87ab363cb90b6dcecdeee33cbec6db3dfd
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Nov 24 11:05:18 2014 +0800
gdkgl.c: Avoid GCCism in Pointer Arithmetic
NULL-plus-something could be seen by the compiler to attempt to do
arithmetic with void *, which is a GCCism. Instead, do the math normally
and cast the results as a void *.
https://bugzilla.gnome.org/show_bug.cgi?id=740605
gdk/gdkgl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
index 73888a2..6791960 100644
--- a/gdk/gdkgl.c
+++ b/gdk/gdkgl.c
@@ -240,7 +240,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
glBindBuffer (GL_ARRAY_BUFFER, paint_data->tmp_vertex_buffer);
glVertexAttribPointer (program->position_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, NULL);
- glVertexAttribPointer (program->uv_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, NULL +
sizeof(float) * 2);
+ glVertexAttribPointer (program->uv_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, (void *)
(sizeof(float) * 2));
#define VERTEX_SIZE 4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]