misc: Fix compiler warnings on Cerbero's MinGW
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 5 Feb 2019 16:36:15 +0000 (22:06 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 5 Feb 2019 18:18:13 +0000 (23:48 +0530)
rtpbasedepayload.c:126:5: error: unknown conversion type character 'z' in format [-Werror=format]
profile.c:688:10: error: unused variable 'gst_dir' [-Werror=unused-variable]

tests/check/elements/videoscale.c
tests/check/libs/profile.c
tests/check/libs/rtpbasedepayload.c

index 0ecf1f5..dc90564 100644 (file)
@@ -942,7 +942,8 @@ videoscale_suite (void)
   tcase_add_test (tc_chain, test_reverse_negotiation);
 #endif
   tcase_add_test (tc_chain, test_basetransform_negotiation);
-#elif VSCALE_TEST_GROUP == 1
+#else
+#if VSCALE_TEST_GROUP == 1
   tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_0);
   tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_1);
   tcase_add_test (tc_chain, test_downscale_640x480_320x240_method_2);
@@ -997,6 +998,7 @@ videoscale_suite (void)
   tcase_add_test (tc_chain, test_upscale_1x240_640x480_method_2);
   tcase_add_test (tc_chain, test_upscale_1x240_640x480_method_3);
 #endif
+#endif /* VSCALE_TEST_GROUP */
 
   return s;
 }
index b0e658d..543de2d 100644 (file)
@@ -685,10 +685,11 @@ profile_suite (void)
   Suite *s = suite_create ("profile support library");
   TCase *tc_chain = tcase_create ("general");
   gboolean can_write;
-  gchar *gst_dir;
 
   /* cehck if we can create profiles */
 #ifdef G_OS_UNIX
+  gchar *gst_dir;
+
   gst_dir = g_build_filename (g_get_user_data_dir (), "gstreamer-1.0", NULL);
   can_write = (g_access (gst_dir, R_OK | W_OK | X_OK) == 0);
   g_free (gst_dir);
index 01f1a37..5e6f8a3 100644 (file)
@@ -123,7 +123,8 @@ gst_rtp_dummy_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
     GstMemory *mem = gst_buffer_get_memory (buf, 0);
     gsize size, offset, maxsize;
     size = gst_memory_get_sizes (mem, &offset, &maxsize);
-    GST_LOG ("\tsize=%zd offset=%zd maxsize=%zd", size, offset, maxsize);
+    GST_LOG ("\tsize=%" G_GSIZE_FORMAT " offset=%" G_GSIZE_FORMAT " maxsize=%"
+        G_GSIZE_FORMAT, size, offset, maxsize);
     gst_memory_unref (mem);
   }
 
@@ -144,7 +145,8 @@ gst_rtp_dummy_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
     GstMemory *mem = gst_buffer_get_memory (buf, 0);
     gsize size, offset, maxsize;
     size = gst_memory_get_sizes (mem, &offset, &maxsize);
-    GST_LOG ("\tsize=%zd offset=%zd maxsize=%zd", size, offset, maxsize);
+    GST_LOG ("\tsize=%" G_GSIZE_FORMAT " offset=%" G_GSIZE_FORMAT " maxsize=%"
+        G_GSIZE_FORMAT, size, offset, maxsize);
     gst_memory_unref (mem);
   }