mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
[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:
parent
6f1530c658
commit
6bb3f66c42
2 changed files with 10 additions and 7 deletions
|
@ -174,13 +174,15 @@ gst_gl_filterblur_init_shader (GstGLFilter * filter)
|
||||||
|
|
||||||
//blocking call, wait the opengl thread has compiled the shader
|
//blocking call, wait the opengl thread has compiled the shader
|
||||||
if (!gst_gl_display_gen_shader (filter->display, 0, hconv7_fragment_source,
|
if (!gst_gl_display_gen_shader (filter->display, 0, hconv7_fragment_source,
|
||||||
&blur_filter->shader0));
|
&blur_filter->shader0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
//blocking call, wait the opengl thread has compiled the shader
|
//blocking call, wait the opengl thread has compiled the shader
|
||||||
if (!gst_gl_display_gen_shader (filter->display, 0, vconv7_fragment_source,
|
if (!gst_gl_display_gen_shader (filter->display, 0, vconv7_fragment_source,
|
||||||
&blur_filter->shader1));
|
&blur_filter->shader1))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -283,7 +283,7 @@ gst_gl_filtershader_load_file (char *filename, char **storage)
|
||||||
|
|
||||||
fseek (f, 0, SEEK_SET);
|
fseek (f, 0, SEEK_SET);
|
||||||
bytes = fread ((void *) *storage, sizeof (char), count, f);
|
bytes = fread ((void *) *storage, sizeof (char), count, f);
|
||||||
if (bytes < 0 || bytes != count) {
|
if (bytes != count) {
|
||||||
GST_ERROR ("read failed: %u/%u", bytes, count);
|
GST_ERROR ("read failed: %u/%u", bytes, count);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -338,14 +338,15 @@ gst_gl_filtershader_init_shader (GstGLFilter * filter)
|
||||||
|
|
||||||
//blocking call, wait the opengl thread has compiled the shader
|
//blocking call, wait the opengl thread has compiled the shader
|
||||||
if (!gst_gl_display_gen_shader (filter->display, 0, hfilter_fragment_source,
|
if (!gst_gl_display_gen_shader (filter->display, 0, hfilter_fragment_source,
|
||||||
&filtershader->shader0));
|
&filtershader->shader0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
filtershader->compiled = 1;
|
filtershader->compiled = 1;
|
||||||
|
|
||||||
gst_gl_filtershader_load_variables (filtershader->presetfile,
|
gst_gl_filtershader_load_variables (filtershader->presetfile,
|
||||||
&hfilter_fragment_variables[0]);
|
&hfilter_fragment_variables[0]);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue