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 752051 - GstVideoScaler: Initialised scaling functions to get rid of compiler messages
GstVideoScaler: Initialised scaling functions to get rid of compiler messages
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-07 08:36 UTC by Tobias Mueller
Modified: 2015-08-16 13:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.17 KB, patch)
2015-07-07 08:36 UTC, Tobias Mueller
needs-work Details | Review

Description Tobias Mueller 2015-07-07 08:36:42 UTC
Created attachment 306980 [details] [review]
patch

GstVideoScaler:  Initialised scaling functions to get rid of compiler messages
    
    E.g.
    
    video-scaler.c: In function 'gst_video_scaler_horizontal':
    video-scaler.c:1332:3: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       func (scale, src, dest, dest_offset, width, n_elems);
       ^
    
    video-scaler.c: In function 'gst_video_scaler_vertical':
    video-scaler.c:1373:3: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       func (scale, src_lines, dest, dest_offset, width, n_elems);
       ^
    
    GCC's analyses seem to be correct, for the simple fact that if you pass
    get_functions a known format, but no hscale or vscale, it'll return
    True without having done anything.
    Some callers check for the scale values to be not NULL, but then
    hscale->resampler.max_taps could return 0.
    A different approach to the one presented in this patch is to check
    for those max_taps, too, before calling get_functions.
Comment 1 Sebastian Dröge (slomo) 2015-07-07 10:33:02 UTC
Comment on attachment 306980 [details] [review]
patch

As discussed on IRC, this breaks copying
Comment 2 Wim Taymans 2015-07-07 11:07:25 UTC
commit 190c7f19288bc28a6a0428367ae108bebddaf43d
Author: Tobias Mueller <muelli@cryptobitch.de>
Date:   Thu Jul 2 07:36:12 2015 +0200

    GstVideoScaler: Initialised scaling functions to get rid of compiler messages
    
    E.g.
    
    video-scaler.c: In function 'gst_video_scaler_horizontal':
    video-scaler.c:1332:3: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       func (scale, src, dest, dest_offset, width, n_elems);
       ^
    
    video-scaler.c: In function 'gst_video_scaler_vertical':
    video-scaler.c:1373:3: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       func (scale, src_lines, dest, dest_offset, width, n_elems);
       ^
    
    GCC's analyses seem to be correct, for the simple fact that if you pass
    get_functions a known format, but no hscale or vscale, it'll return
    True without having done anything.
    Some callers check for the scale values to be not NULL, but then
    hscale->resampler.max_taps could return 0.
    A different approach to the one presented in this patch is to check
    for those max_taps, too, before calling get_functions.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=752051