misc: Fix various compiler warnings on MinGW

gstharness.c: Use G_GSIZE_FORMAT instead of hard-coding %zu
error: unknown conversion type character 'z' in format [-Werror=format]

gst-inspect.c: GPid is void* on non-UNIX, and we only use it on UNIX
error: initialization makes pointer from integer without a cast [-Werror]

gstmeta.c: Use and then discard value
error: value computed is not used [-Werror=unused-value]

With this, gstreamer builds with -Werror on MinGW
This commit is contained in:
Nirbheek Chauhan 2019-02-05 18:18:48 +05:30
parent d3a2ed10fe
commit febfabb39f
3 changed files with 5 additions and 2 deletions

View file

@ -1555,7 +1555,8 @@ gst_harness_create_buffer (GstHarness * h, gsize size)
g_assert_cmpint (flow, ==, GST_FLOW_OK);
if (gst_buffer_get_size (ret) != size) {
GST_DEBUG_OBJECT (h,
"use fallback, pool is configured with a different size (%zu != %zu)",
"use fallback, pool is configured with a different size (%"
G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT ")",
size, gst_buffer_get_size (ret));
gst_buffer_unref (ret);
ret = NULL;

View file

@ -182,7 +182,7 @@ foo_transform_func (GstBuffer * transbuf, GstMeta * meta,
g_quark_to_string (type), buffer, transbuf, meta);
if (GST_META_TRANSFORM_IS_COPY (type)) {
GST_META_FOO_ADD (transbuf);
G_GNUC_UNUSED GstMetaFoo *unused = GST_META_FOO_ADD (transbuf);
} else {
/* return FALSE, if transform type is not supported */
return FALSE;

View file

@ -51,7 +51,9 @@
gboolean colored_output = TRUE;
#ifdef G_OS_UNIX
GPid child_pid = -1;
#endif
GMainLoop *loop = NULL;
/* Console colors */