After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747312 - clean compiler warnings.
clean compiler warnings.
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 743569
 
 
Reported: 2015-04-03 18:47 UTC by Víctor Manuel Jáquez Leal
Modified: 2015-04-09 08:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decoder: cast GST_VAAPI_DECODER_STATUS_DROP_FRAME (3.83 KB, patch)
2015-04-03 18:47 UTC, Víctor Manuel Jáquez Leal
none Details | Review
encoder: mpeg2: use fabsf() instead of abs() (1.56 KB, patch)
2015-04-03 18:48 UTC, Víctor Manuel Jáquez Leal
none Details | Review
libs: remove unused variables (1.86 KB, patch)
2015-04-03 18:48 UTC, Víctor Manuel Jáquez Leal
none Details | Review
encoder: avoid GstVaapiCodedBuffer redefinition (1.31 KB, patch)
2015-04-03 18:49 UTC, Víctor Manuel Jáquez Leal
none Details | Review
encoder: h264: casts slice_param->slice_type (1.31 KB, patch)
2015-04-03 18:50 UTC, Víctor Manuel Jáquez Leal
none Details | Review
decoder: mpeg4: remove an spurious comparison (1.22 KB, patch)
2015-04-03 18:50 UTC, Víctor Manuel Jáquez Leal
none Details | Review

Description Víctor Manuel Jáquez Leal 2015-04-03 18:47:32 UTC
Using clang, it reports several warnings among the gstreamer-vaapi code.

These patches solve all those warnings.
Comment 1 Víctor Manuel Jáquez Leal 2015-04-03 18:47:44 UTC
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.
Comment 2 Víctor Manuel Jáquez Leal 2015-04-03 18:48:17 UTC
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.
Comment 3 Víctor Manuel Jáquez Leal 2015-04-03 18:48:48 UTC
Created attachment 300907 [details] [review]
libs: remove unused variables

clang reports these unused variables. Let's get rid of them.
Comment 4 Víctor Manuel Jáquez Leal 2015-04-03 18:49:26 UTC
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.
Comment 5 Víctor Manuel Jáquez Leal 2015-04-03 18:50:01 UTC
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.
Comment 6 Víctor Manuel Jáquez Leal 2015-04-03 18:50:47 UTC
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.
Comment 7 Víctor Manuel Jáquez Leal 2015-04-08 15:00:44 UTC
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
Comment 8 sreerenj 2015-04-09 08:00:42 UTC
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...
Comment 9 Víctor Manuel Jáquez Leal 2015-04-09 08:09:07 UTC
(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!