From 6bb3f66c4255136c827df39495ef0ea7ad9eec1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 6 Mar 2012 14:31:05 +0100 Subject: [PATCH] [487/906] gl: Fix compiler warnings 'if statement has empty body', which were real bugs and 'comparison of unsigned expression < 0 is always false', which was only an unneeded comparison. --- gst/gl/gstglfilterblur.c | 10 ++++++---- gst/gl/gstglfiltershader.c | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gst/gl/gstglfilterblur.c b/gst/gl/gstglfilterblur.c index 8da91401e1..73b934fd4f 100644 --- a/gst/gl/gstglfilterblur.c +++ b/gst/gl/gstglfilterblur.c @@ -174,13 +174,15 @@ gst_gl_filterblur_init_shader (GstGLFilter * filter) //blocking call, wait the opengl thread has compiled the shader if (!gst_gl_display_gen_shader (filter->display, 0, hconv7_fragment_source, - &blur_filter->shader0)); - return FALSE; + &blur_filter->shader0)) + return FALSE; //blocking call, wait the opengl thread has compiled the shader if (!gst_gl_display_gen_shader (filter->display, 0, vconv7_fragment_source, - &blur_filter->shader1)); - return FALSE; + &blur_filter->shader1)) + return FALSE; + + return TRUE; } static gboolean diff --git a/gst/gl/gstglfiltershader.c b/gst/gl/gstglfiltershader.c index 00f4498fc9..f0d01c44a3 100644 --- a/gst/gl/gstglfiltershader.c +++ b/gst/gl/gstglfiltershader.c @@ -283,7 +283,7 @@ gst_gl_filtershader_load_file (char *filename, char **storage) fseek (f, 0, SEEK_SET); bytes = fread ((void *) *storage, sizeof (char), count, f); - if (bytes < 0 || bytes != count) { + if (bytes != count) { GST_ERROR ("read failed: %u/%u", bytes, count); return -1; } @@ -338,14 +338,15 @@ gst_gl_filtershader_init_shader (GstGLFilter * filter) //blocking call, wait the opengl thread has compiled the shader if (!gst_gl_display_gen_shader (filter->display, 0, hfilter_fragment_source, - &filtershader->shader0)); - return FALSE; + &filtershader->shader0)) + return FALSE; filtershader->compiled = 1; gst_gl_filtershader_load_variables (filtershader->presetfile, &hfilter_fragment_variables[0]); + return TRUE; } static gboolean