GNOME Bugzilla – Bug 789351
GskRenderNode: "const gsize" return type gives compilation error
Last modified: 2017-10-23 14:31:42 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?
Likely, a copy-paste thinko.
Created attachment 362101 [details] [review] Remove unnecessary const We return a scalar value, so we don't need it to be constant.
Created attachment 362102 [details] [review] patch: gskrendernode: Don't return const gsize
Attachment 362101 [details] pushed as dd4c800 - Remove unnecessary const
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!
Sorry, Emmanuele. I added my patch without noticing yours.