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 789351 - GskRenderNode: "const gsize" return type gives compilation error
GskRenderNode: "const gsize" return type gives compilation error
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.92.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-23 14:14 UTC by Kjell Ahlstedt
Modified: 2017-10-23 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove unnecessary const (1.54 KB, patch)
2017-10-23 14:24 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
patch: gskrendernode: Don't return const gsize (1.58 KB, patch)
2017-10-23 14:27 UTC, Kjell Ahlstedt
none Details | Review

Description Kjell Ahlstedt 2017-10-23 14:14:14 UTC
The declaration

  const gsize gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node);

in gsk/gskrendernode.h results in this compilation error when gtkmm is built:

/opt/gnome/include/gtk-4.0/gsk/gskrendernode.h:120:100: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
 const gsize gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node);
                                                                            ^
cc1plus: all warnings being treated as errors

Why 'const' here?
Comment 1 Emmanuele Bassi (:ebassi) 2017-10-23 14:24:01 UTC
Likely, a copy-paste thinko.
Comment 2 Emmanuele Bassi (:ebassi) 2017-10-23 14:24:12 UTC
Created attachment 362101 [details] [review]
Remove unnecessary const

We return a scalar value, so we don't need it to be constant.
Comment 3 Kjell Ahlstedt 2017-10-23 14:27:47 UTC
Created attachment 362102 [details] [review]
patch: gskrendernode: Don't return const gsize
Comment 4 Emmanuele Bassi (:ebassi) 2017-10-23 14:29:28 UTC
Attachment 362101 [details] pushed as dd4c800 - Remove unnecessary const
Comment 5 Emmanuele Bassi (:ebassi) 2017-10-23 14:30:38 UTC
Sorry about that: attached the patch while I was doing a test build and didn't see yours once I ran git-bz.

Thanks for the patch!
Comment 6 Kjell Ahlstedt 2017-10-23 14:31:42 UTC
Sorry, Emmanuele. I added my patch without noticing yours.