GNOME Bugzilla – Bug 747312
clean compiler warnings.
Last modified: 2015-04-09 08:09:07 UTC
Using clang, it reports several warnings among the gstreamer-vaapi code. These patches solve all those warnings.
Created attachment 300905 [details] [review] decoder: cast GST_VAAPI_DECODER_STATUS_DROP_FRAME Since GST_VAAPI_DECODER_STATUS_DROP_FRAME is not part of the enum GstVaapiDecoderStatus, we need to cast it to avoid compiler complains.
Created attachment 300906 [details] [review] encoder: mpeg2: use fabsf() instead of abs() The member value in frame_rate_tab is float, the result of the abs() function should be float too. But abs() only manages integers. This patch replaces abs() with fabsf() to handle correctly the possible floats values.
Created attachment 300907 [details] [review] libs: remove unused variables clang reports these unused variables. Let's get rid of them.
Created attachment 300908 [details] [review] encoder: avoid GstVaapiCodedBuffer redefinition The symbol GstVaapiCodedBuffer is already defined in gst-libs/gst/vaapi/gstvaapicodedbuffer.h which is loaded, at the end, by gstvaapiencoder_objects.h. Clang complains about the symbol re-definition. This patch removes that redefinition.
Created attachment 300909 [details] [review] encoder: h264: casts slice_param->slice_type slice_type in slice_param is defined as (char *), but it is compared against a signed integer. clang complains about this comparison. This patch casts the variable.
Created attachment 300910 [details] [review] decoder: mpeg4: remove an spurious comparison The member size in GstMpeg4Packet is gsize which is unsigned, which cannot be less than zero. Hence this pre-condition test is a no-op. This patch removes that code.
commit a6518f68880df0c5b4dcd5f15908efbd02b02eef Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Apr 3 20:38:07 2015 +0200 decoder: mpeg4: remove an spurious comparison The member size in GstMpeg4Packet is gsize which is unsigned, which cannot be less than zero. Hence this pre-condition test is a no-op. This patch removes that code. https://bugzilla.gnome.org/show_bug.cgi?id=747312 commit 7c71f057b406d0922e92cb3a59e91747aee7bcb2 Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Apr 3 20:33:44 2015 +0200 encoder: h264: casts slice_param->slice_type slice_type in slice_param is defined as (char *), but it is compared against a signed integer. clang complains about this comparison. This patch casts the variable. https://bugzilla.gnome.org/show_bug.cgi?id=747312 commit b1bbc087c1d00a30910673a61b2872cd629c9663 Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Apr 3 20:31:47 2015 +0200 encoder: avoid GstVaapiCodedBuffer redefinition The symbol GstVaapiCodedBuffer is already defined in gst-libs/gst/vaapi/gstvaapicodedbuffer.h which is loaded, at the end, by gstvaapiencoder_objects.h. Clang complains about the symbol re-definition. This patch removes that redefinition. https://bugzilla.gnome.org/show_bug.cgi?id=747312 commit c82e51738fcae3c5952e551eebc0842b49c58ad0 Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Apr 3 20:28:22 2015 +0200 libs: remove unused variables clang reports these unused variables. Let's get rid of them. https://bugzilla.gnome.org/show_bug.cgi?id=747312 commit d363000eaaa239c43cf1400199aa72b845aa73e1 Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Apr 3 20:27:24 2015 +0200 encoder: mpeg2: use fabsf() instead of abs() The member value in frame_rate_tab is float, the result of the abs() function should be float too. But abs() only manages integers. This patch replaces abs() with fabsf() to handle correctly the possible floats values. https://bugzilla.gnome.org/show_bug.cgi?id=747312 commit c9f0807752f6ae09ee85478c8d16d53d222f6435 Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Apr 3 20:02:29 2015 +0200 decoder: cast GST_VAAPI_DECODER_STATUS_DROP_FRAME Since GST_VAAPI_DECODER_STATUS_DROP_FRAME is not part of the enum GstVaapiDecoderStatus, we need to cast it to avoid compiler complains. https://bugzilla.gnome.org/show_bug.cgi?id=747312
Could you please add #743569 in the "Blocks" field of any bug that you are closing?? Which is helpful to track the status during next release...
(In reply to sreerenj from comment #8) > Could you please add #743569 in the "Blocks" field of any bug that you are > closing?? Which is helpful to track the status during next release... Indeed!