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 693980 - Enumeration type mixup in analysis-anova.c
Enumeration type mixup in analysis-anova.c
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other All
: Normal normal
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-02-16 19:01 UTC by Morten Welinder
Modified: 2013-02-18 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2013-02-16 19:01:43 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);
                                              ^~~~~~~~~~~~~~~~~~~~~~
Comment 1 Morten Welinder 2013-02-16 19:03:04 UTC
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) {
                                            ^~
                                            |
Comment 2 Andreas J. Guelzow 2013-02-18 03:48:52 UTC
Wow, we have GNM_STYLE_BORDER_HORIZ and GNM_STYLE_BORDER_HORIZONTAL. This looks like it is designed to be confused.
Comment 3 Andreas J. Guelzow 2013-02-18 04:34:21 UTC
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.
Comment 4 Morten Welinder 2013-02-18 14:16:28 UTC
GNM_STYLE_BORDER_ORIENTATION_HORIZONTAL?
Comment 5 Andreas J. Guelzow 2013-02-18 14:51:33 UTC
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,
Comment 6 Morten Welinder 2013-02-18 15:33:58 UTC
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.