[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.
This commit is contained in:
Sebastian Dröge 2012-03-06 14:31:05 +01:00 committed by Matthew Waters
parent 6f1530c658
commit 6bb3f66c42
2 changed files with 10 additions and 7 deletions

View file

@ -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

View file

@ -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