GNOME Bugzilla – Bug 693980
Enumeration type mixup in analysis-anova.c
Last modified: 2013-02-18 15:33:58 UTC
analysis-anova.c:247:26: warning: implicit conversion from enumeration type 'GnmStyleBorderLocation' to different enumeration type 'GnmStyleBorderOrientation' [-Wconversion] style_color_black (), GNM_STYLE_BORDER_HORIZ); ^~~~~~~~~~~~~~~~~~~~~~ analysis-anova.c:249:26: warning: implicit conversion from enumeration type 'GnmStyleBorderLocation' to different enumeration type 'GnmStyleBorderOrientation' [-Wconversion] style_color_black (), GNM_STYLE_BORDER_HORIZ); ^~~~~~~~~~~~~~~~~~~~~~ analysis-anova.c:606:26: warning: implicit conversion from enumeration type 'GnmStyleBorderLocation' to different enumeration type 'GnmStyleBorderOrientation' [-Wconversion] style_color_black (), GNM_STYLE_BORDER_HORIZ); ^~~~~~~~~~~~~~~~~~~~~~ analysis-anova.c:608:26: warning: implicit conversion from enumeration type 'GnmStyleBorderLocation' to different enumeration type 'GnmStyleBorderOrientation' [-Wconversion] style_color_black (), GNM_STYLE_BORDER_HORIZ); ^~~~~~~~~~~~~~~~~~~~~~
Missing "type ==" here? dialog-analysis-tools.c:2910:38: warning: use of logical '||' with constant operand [-Wconstant-logical-operand] if (type == moving_average_type_sma || moving_average_type_wma) { ^ ~~~~~~~~~~~~~~~~~~~~~~~ dialog-analysis-tools.c:2910:38: note: use '|' for a bitwise operation if (type == moving_average_type_sma || moving_average_type_wma) { ^~ |
Wow, we have GNM_STYLE_BORDER_HORIZ and GNM_STYLE_BORDER_HORIZONTAL. This looks like it is designed to be confused.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
GNM_STYLE_BORDER_ORIENTATION_HORIZONTAL?
I don't understand the purpose for GNM_STYLE_BORDER_HORIZ or the difference between "location" and "orientation" in the context of borders. The comment reads: /* These are special. * They are logical rather than actual borders, however, they * require extra lines to be drawn so they need to be here. */ GNM_STYLE_BORDER_HORIZ, GNM_STYLE_BORDER_VERT,
I somehow doubt whomever wrote that will remember. This code is _old_. git suggests Michael Meeks as the author back in 1999, but I could be wrong.