Fix compiler warnings

This patch fixes some warnings that gcc 4.9 reports.

https://bugzilla.gnome.org/show_bug.cgi?id=744411
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-02-18 11:46:11 +02:00 committed by Sreerenj Balachandran
parent ce4d3355e1
commit 671b1ea305
7 changed files with 7 additions and 29 deletions

View file

@ -454,7 +454,6 @@ libgstvaapi_wayland_@GST_API_VERSION@_la_CFLAGS = \
$(GST_VIDEO_CFLAGS) \
$(WAYLAND_CFLAGS) \
$(LIBVA_WAYLAND_CFLAGS) \
$(top_builddir)/gst-libs/gst/video/libgstvaapi-videoutils.la \
$(NULL)
libgstvaapi_wayland_@GST_API_VERSION@_la_LIBADD = \
@ -464,6 +463,7 @@ libgstvaapi_wayland_@GST_API_VERSION@_la_LIBADD = \
$(WAYLAND_LIBS) \
$(LIBVA_WAYLAND_LIBS) \
libgstvaapi-$(GST_API_VERSION).la \
$(top_builddir)/gst-libs/gst/video/libgstvaapi-videoutils.la \
$(NULL)
libgstvaapi_wayland_@GST_API_VERSION@_la_LDFLAGS = \

View file

@ -286,7 +286,7 @@ gst_vaapi_buffer_proxy_get_type (GstVaapiBufferProxy * proxy)
guintptr
gst_vaapi_buffer_proxy_get_handle (GstVaapiBufferProxy * proxy)
{
g_return_val_if_fail (proxy != NULL, NULL);
g_return_val_if_fail (proxy != NULL, 0);
return GST_VAAPI_BUFFER_PROXY_HANDLE (proxy);
}

View file

@ -908,8 +908,9 @@ gst_interlace_mode_to_string (GstVideoInterlaceMode mode)
return "interleaved";
case GST_VIDEO_INTERLACE_MODE_MIXED:
return "mixed";
default:
return "<unknown>";
}
return "<unknown>";
}
void

View file

@ -2561,7 +2561,7 @@ exec_picture_refs_modification_1(
GstH264RefPicListModification *ref_pic_list_modification;
guint num_ref_pic_list_modifications;
GstVaapiPictureH264 **ref_list;
guint *ref_list_count_ptr, ref_list_count, ref_list_idx = 0;
guint *ref_list_count_ptr, ref_list_idx = 0;
const guint16 *view_ids = NULL;
guint i, j, n, num_refs, num_view_ids = 0;
gint found_ref_idx;
@ -2611,7 +2611,6 @@ exec_picture_refs_modification_1(
}
}
}
ref_list_count = *ref_list_count_ptr;
if (!GST_VAAPI_PICTURE_IS_FRAME(picture)) {
MaxPicNum = 1 << (sps->log2_max_frame_num_minus4 + 5); // 2 * MaxFrameNum

View file

@ -2134,7 +2134,7 @@ gst_vaapi_display_has_opengl (GstVaapiDisplay * display)
{
GstVaapiDisplayClass *klass;
g_return_val_if_fail (display != NULL, NULL);
g_return_val_if_fail (display != NULL, FALSE);
klass = GST_VAAPI_DISPLAY_GET_CLASS (display);
return (klass->display_type == GST_VAAPI_DISPLAY_TYPE_GLX);

View file

@ -134,8 +134,6 @@ generate_sampling_factors (GstVaapiEncoderJpeg * encoder)
static GstVaapiEncoderStatus
ensure_profile (GstVaapiEncoderJpeg * encoder)
{
GstVaapiProfile profile;
/* Always start from "simple" profile for maximum compatibility */
encoder->profile = GST_VAAPI_PROFILE_JPEG_BASELINE;
@ -210,9 +208,7 @@ fill_picture (GstVaapiEncoderJpeg * encoder,
GstVaapiEncPicture * picture,
GstVaapiCodedBuffer * codedbuf, GstVaapiSurfaceProxy * surface)
{
GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder);
VAEncPictureParameterBufferJPEG *const pic_param = picture->param;
GstVideoInfo *vinfo = GST_VAAPI_ENCODER_VIDEO_INFO (encoder);
memset (pic_param, 0, sizeof (VAEncPictureParameterBufferJPEG));
@ -572,13 +568,6 @@ bs_write_jpeg_header (GstBitWriter * bs, GstVaapiEncoderJpeg * encoder,
gst_bit_writer_put_bits_uint8 (bs, 0, 4); //0 for Baseline
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write Jpeg raw data header");
return FALSE;
}
}
static gboolean
@ -611,14 +600,6 @@ add_packed_header (GstVaapiEncoderJpeg * encoder, GstVaapiEncPicture * picture)
gst_bit_writer_clear (&bs, TRUE);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write Packed Raw Data header");
gst_bit_writer_clear (&bs, TRUE);
return FALSE;
}
}
static gboolean
@ -722,9 +703,6 @@ gst_vaapi_encoder_jpeg_reconfigure (GstVaapiEncoder * base_encoder)
generate_sampling_factors (encoder);
return set_context_info (base_encoder);
error:
return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
}
static gboolean

View file

@ -370,7 +370,7 @@ gst_vaapi_video_memory_reset_surface (GstVaapiVideoMemory * mem)
gboolean
gst_vaapi_video_memory_sync (GstVaapiVideoMemory * mem)
{
g_return_val_if_fail (mem, NULL);
g_return_val_if_fail (mem, FALSE);
return ensure_surface_is_current (mem);
}