summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2015-06-10 14:10:34 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2015-06-10 14:10:34 +0100
commit15b952e03ef4f221a5029d37c44e0410c98f31f2 (patch)
tree22546dc81ff9815d14b83f050a5b2f739cdc83e6
parent5069f65571de4a8fed693884e606532bae188238 (diff)
downloadcogl-15b952e03ef4f221a5029d37c44e0410c98f31f2.tar.gz
Fix compiler warnings
Simple enumeration checks.
-rw-r--r--cogl/driver/gl/cogl-attribute-gl.c2
-rw-r--r--cogl/driver/gl/cogl-pipeline-fragend-fixed.c3
-rw-r--r--cogl/driver/gl/cogl-util-gl.c5
3 files changed, 10 insertions, 0 deletions
diff --git a/cogl/driver/gl/cogl-attribute-gl.c b/cogl/driver/gl/cogl-attribute-gl.c
index b23b0abf..34ddb559 100644
--- a/cogl/driver/gl/cogl-attribute-gl.c
+++ b/cogl/driver/gl/cogl-attribute-gl.c
@@ -82,6 +82,8 @@ toggle_builtin_attribute_enabled_cb (int bit_num, void *user_data)
case COGL_ATTRIBUTE_NAME_ID_NORMAL_ARRAY:
cap = GL_NORMAL_ARRAY;
break;
+ default:
+ g_assert_not_reached ();
}
if (enabled)
GE (context, glEnableClientState (cap));
diff --git a/cogl/driver/gl/cogl-pipeline-fragend-fixed.c b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
index 7e461f97..55b09568 100644
--- a/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
+++ b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
@@ -208,6 +208,9 @@ _cogl_pipeline_fragend_fixed_add_layer (CoglPipeline *pipeline,
case COGL_TEXTURE_TYPE_RECTANGLE:
gl_target = GL_TEXTURE_RECTANGLE_ARB;
break;
+
+ default:
+ g_assert_not_reached ();
}
_cogl_set_active_texture_unit (unit_index);
diff --git a/cogl/driver/gl/cogl-util-gl.c b/cogl/driver/gl/cogl-util-gl.c
index 814621a9..a50a8a30 100644
--- a/cogl/driver/gl/cogl-util-gl.c
+++ b/cogl/driver/gl/cogl-util-gl.c
@@ -139,6 +139,11 @@ _cogl_gl_util_get_texture_target_string (CoglTextureType texture_type,
target_string = "2DRect";
tex_coord_swizzle = "st";
break;
+
+ default:
+ target_string = "Unknown";
+ tex_coord_swizzle = NULL;
+ g_assert_not_reached ();
}
if (target_string_out)