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 765042 - subparse: fix build error with GCC 4.6.3
subparse: fix build error with GCC 4.6.3
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-14 11:26 UTC by Vincent Penquerc'h
Modified: 2016-04-15 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
subparse: fix build error with GCC 4.6.3 (1.30 KB, patch)
2016-04-14 11:26 UTC, Vincent Penquerc'h
none Details | Review
subparse: fix build error with GCC 4.6.3 (1.38 KB, patch)
2016-04-15 11:55 UTC, Vincent Penquerc'h
none Details | Review
subparse: fix build error with GCC 4.6.3 (1.49 KB, patch)
2016-04-15 12:14 UTC, Vincent Penquerc'h
committed Details | Review

Description Vincent Penquerc'h 2016-04-14 11:26:51 UTC
Created attachment 325990 [details] [review]
subparse: fix build error with GCC 4.6.3

gstsubparse.c: In function ‘parse_subrip’:
gstsubparse.c:988:7: error: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors
Comment 1 Tim-Philipp Müller 2016-04-14 11:39:06 UTC
Uh, that's ..., casting a return value to (void) has been used for centuries to indicate that the return value is not use on purpose, I wonder when that changed? (Also, what distro is this? Why doesn't anyone else get this?)
Comment 2 Vincent Penquerc'h 2016-04-14 11:45:12 UTC
This particular one is on Ubuntu 12.04.5, gcc 4.6.3.
Why others don't get this... Maybe GCC developers realized they'd gone too far in the false positive direction and reverted ? Since that's an old distro, if it's fine everywhere, I guess It'd be fine to leave it as is.
Comment 3 Tim-Philipp Müller 2016-04-15 11:45:53 UTC
Ah well, might just as well fix it properly.

Could you change the strtol() to g_ascii_strtoll/ull() while you're at it?
Comment 4 Vincent Penquerc'h 2016-04-15 11:55:51 UTC
Created attachment 326088 [details] [review]
subparse: fix build error with GCC 4.6.3
Comment 5 Tim-Philipp Müller 2016-04-15 12:09:49 UTC
Comment on attachment 326088 [details] [review]
subparse: fix build error with GCC 4.6.3

Thanks, looks good to me.

Please could you git commit --amend to add the bugzilla url at the bottom.

The if blocks could probably also be if else if else if ? (But doesn't really matter I suppose)
Comment 6 Vincent Penquerc'h 2016-04-15 12:14:48 UTC
Created attachment 326090 [details] [review]
subparse: fix build error with GCC 4.6.3

both done.
Comment 7 Tim-Philipp Müller 2016-04-15 12:32:56 UTC
Comment on attachment 326090 [details] [review]
subparse: fix build error with GCC 4.6.3

Thanks, please just push if/when you're happy with it :)
Comment 8 Vincent Penquerc'h 2016-04-15 12:34:56 UTC
Thanks, pushed:

commit d1ecd3cfa732fe9aeeb55850d9fe8bc4801c8099
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Fri Apr 15 12:54:32 2016 +0100

    subparse: fix build with GCC 4.6.3
    
    gstsubparse.c: In function ‘parse_subrip’:
    gstsubparse.c:988:7: error: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Werror=unused-resu
    cc1: all warnings being treated as errors
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765042