From 2fac6fa6a6e1d4d0cdc787e9b3c5fbc3084511d4 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 19 Jul 2017 02:21:42 +0530 Subject: [PATCH] decklink: Fix format specifier warnings in logging gstdecklinkvideosrc.cpp:425:7: warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'HRESULT {aka long int}' [-Wformat] [and so on] --- sys/decklink/gstdecklinkaudiosink.cpp | 8 ++++---- sys/decklink/gstdecklinkvideosrc.cpp | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/decklink/gstdecklinkaudiosink.cpp b/sys/decklink/gstdecklinkaudiosink.cpp index beabc02506..68aa10d8cc 100644 --- a/sys/decklink/gstdecklinkaudiosink.cpp +++ b/sys/decklink/gstdecklinkaudiosink.cpp @@ -275,7 +275,7 @@ public: written_sum += written; } while (len > 0 && res == S_OK); - GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08x", written_sum, + GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx", written_sum, res); gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer), @@ -319,7 +319,7 @@ gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb) ret = 0; } - GST_DEBUG_OBJECT (self->sink, "Delay: %u (0x%08x)", ret, res); + GST_DEBUG_OBJECT (self->sink, "Delay: %u (0x%08lx)", ret, res); return ret; } @@ -414,7 +414,7 @@ gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb, ret = self->output->output->EnableAudioOutput (bmdAudioSampleRate48kHz, sample_depth, spec->info.channels, bmdAudioOutputStreamContinuous); if (ret != S_OK) { - GST_WARNING_OBJECT (self->sink, "Failed to enable audio output 0x%08x", + GST_WARNING_OBJECT (self->sink, "Failed to enable audio output 0x%08lx", ret); return FALSE; } @@ -424,7 +424,7 @@ gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb, output->SetAudioCallback (new GStreamerAudioOutputCallback (self)); if (ret != S_OK) { GST_WARNING_OBJECT (self->sink, - "Failed to set audio output callback 0x%08x", ret); + "Failed to set audio output callback 0x%08lx", ret); return FALSE; } diff --git a/sys/decklink/gstdecklinkvideosrc.cpp b/sys/decklink/gstdecklinkvideosrc.cpp index a3313e50d0..542fd442b9 100644 --- a/sys/decklink/gstdecklinkvideosrc.cpp +++ b/sys/decklink/gstdecklinkvideosrc.cpp @@ -423,7 +423,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) gst_decklink_get_connection (self->connection)); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to set configuration (input source): 0x%08x", ret); + "Failed to set configuration (input source): 0x%08lx", ret); return FALSE; } @@ -432,7 +432,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) bmdAnalogVideoFlagCompositeSetup75); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to set configuration (composite setup): 0x%08x", ret); + "Failed to set configuration (composite setup): 0x%08lx", ret); return FALSE; } } @@ -449,7 +449,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) &autoDetection); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to get attribute (autodetection): 0x%08x", ret); + "Failed to get attribute (autodetection): 0x%08lx", ret); return FALSE; } if (autoDetection) @@ -467,7 +467,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) format = self->caps_format; ret = self->input->input->EnableVideoInput (mode->mode, format, flags); if (ret != S_OK) { - GST_WARNING_OBJECT (self, "Failed to enable video input: 0x%08x", ret); + GST_WARNING_OBJECT (self, "Failed to enable video input: 0x%08lx", ret); return FALSE; } @@ -698,7 +698,7 @@ gst_decklink_video_src_got_frame (GstElement * element, res = dtc->GetComponents (&hours, &minutes, &seconds, &frames); if (res != S_OK) { - GST_ERROR ("Could not get components for timecode %p: 0x%08x", dtc, + GST_ERROR ("Could not get components for timecode %p: 0x%08lx", dtc, res); f.tc = NULL; } else { @@ -1031,7 +1031,7 @@ gst_decklink_video_src_start_streams (GstElement * element) res = self->input->input->StartStreams (); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to start streams: 0x%08x", res)); + (NULL), ("Failed to start streams: 0x%08lx", res)); return; } } else { @@ -1085,7 +1085,7 @@ gst_decklink_video_src_change_state (GstElement * element, res = self->input->input->StopStreams (); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to stop streams: 0x%08x", res)); + (NULL), ("Failed to stop streams: 0x%08lx", res)); ret = GST_STATE_CHANGE_FAILURE; } break;