Module: Mesa
Branch: master
Commit: 548bf70fd22ca862692abc83700ff5010f92b9b6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=548bf70fd22ca862692abc83700ff5010f92b9b6

Author: Rhys Kidd <rhysk...@gmail.com>
Date:   Tue Sep  8 23:15:27 2015 +0800

mesa: Resolve GCC missing field initializer warning.

Resolve a series of missing field initializer warnings within get_hash_params.py

Of the form:
In file included from mesa/src/mesa/main/get.c:495:0:
mesa/src/mesa/main/get_hash.h:180:5: warning: missing initializer for field
'extra' of 'const struct value_desc' [-Wmissing-field-initializers]
     { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 },
     ^
mesa/src/mesa/main/get.c:165:15: note: 'extra' declared here
    const int *extra;
               ^

This patch addresses some likely code rot around the *extra field, where the
initialization is via C code generated indirectly from a Python script.
It resolves a number of warnings reported by GCC when configured to be pedantic.

$ gcc --version
gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2

No piglit regressions on Ironlake.

v2:
- Squash series into a single patch.

Signed-off-by: Rhys Kidd <rhysk...@gmail.com>
Reviewed-by: Iago Toral Quiroga <ito...@igalia.com>
Reviewed-by: Jan Vesely <jan.ves...@rutgers.edu>
Reviewed-by: Thomas Helland <thomashellan...@gmail.com>
Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com>

---

 src/mesa/main/get_hash_params.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 09e1f0e..c06835a 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -234,10 +234,10 @@ descriptor=[
 
 { "apis": ["GLES"], "params": [
 # OES_point_size_array
-  [ "POINT_SIZE_ARRAY_OES", 
"ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN)" ],
-  [ "POINT_SIZE_ARRAY_TYPE_OES", 
"ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM)" ],
-  [ "POINT_SIZE_ARRAY_STRIDE_OES", 
"ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT)" ],
-  [ "POINT_SIZE_ARRAY_BUFFER_BINDING_OES", "LOC_CUSTOM, TYPE_INT, 0" ],
+  [ "POINT_SIZE_ARRAY_OES", 
"ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN), 
NO_EXTRA" ],
+  [ "POINT_SIZE_ARRAY_TYPE_OES", 
"ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM), NO_EXTRA" ],
+  [ "POINT_SIZE_ARRAY_STRIDE_OES", 
"ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT), NO_EXTRA" 
],
+  [ "POINT_SIZE_ARRAY_BUFFER_BINDING_OES", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" 
],
 ]},
 
 { "apis": ["GL", "GL_CORE", "GLES2"], "params": [

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to