summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-02-01 13:02:13 +0000
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-02-02 16:17:43 +0100
commit24168a2093b9a9380d6b47d1dc2600545489f6b7 (patch)
tree2b19e372dc7043cb97ddab6661220862894df178 /tests
parenteb2daed2a7495f9049126a198548d68938346096 (diff)
downloadgst-vaapi-24168a2093b9a9380d6b47d1dc2600545489f6b7.tar.gz
vaapi: fix 'ISO C90 forbids mixed declarations and code' compiler warnings
Declare variables at the beginning of a code block, which is how it's done in GStreamer. https://bugzilla.gnome.org/show_bug.cgi?id=759192
Diffstat (limited to 'tests')
-rw-r--r--tests/simple-encoder.c7
-rw-r--r--tests/test-filter.c5
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/simple-encoder.c b/tests/simple-encoder.c
index ae0c20de..b424d692 100644
--- a/tests/simple-encoder.c
+++ b/tests/simple-encoder.c
@@ -409,19 +409,22 @@ app_run (App * app)
buffer_thread = g_thread_new ("get buffer thread", get_buffer_thread, app);
while (1) {
+ GstVaapiSurfaceProxy *proxy;
+ GstVaapiSurface *surface;
+
if (!load_frame (app, image))
break;
if (!gst_vaapi_image_unmap (image))
break;
- GstVaapiSurfaceProxy *proxy =
+ proxy =
gst_vaapi_surface_proxy_new_from_pool (GST_VAAPI_SURFACE_POOL (pool));
if (!proxy) {
g_warning ("Could not get surface proxy from pool.");
break;
}
- GstVaapiSurface *surface = gst_vaapi_surface_proxy_get_surface (proxy);
+ surface = gst_vaapi_surface_proxy_get_surface (proxy);
if (!surface) {
g_warning ("Could not get surface from proxy.");
break;
diff --git a/tests/test-filter.c b/tests/test-filter.c
index 05dfee9d..0f681e8d 100644
--- a/tests/test-filter.c
+++ b/tests/test-filter.c
@@ -246,12 +246,13 @@ parse_enum(const gchar *str, GType type, gint default_value,
g_return_val_if_fail(out_value_ptr != NULL, FALSE);
if (str) {
+ const GEnumValue *enum_value;
GEnumClass * const enum_class = g_type_class_ref(type);
+
if (!enum_class)
return FALSE;
- const GEnumValue * const enum_value =
- g_enum_get_value_by_nick(enum_class, str);
+ enum_value = g_enum_get_value_by_nick(enum_class, str);
if (enum_value)
out_value = enum_value->value;
g_type_class_unref(enum_class);