[Goodies-dev] [Bug 13915] New: Fix build with clang for enum type GtkOrientation and XfcePanelPluginMode
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Thu Oct 12 19:45:55 CEST 2017
https://bugzilla.xfce.org/show_bug.cgi?id=13915
Bug ID: 13915
Summary: Fix build with clang for enum type GtkOrientation and
XfcePanelPluginMode
Classification: Panel Plugins
Product: Xfce4-weather-plugin
Version: 0.8.10
Hardware: Other
OS: FreeBSD
Status: NEW
Severity: normal
Priority: Medium
Component: General
Assignee: hjudt at xfce.org
Reporter: duchateau.olivier at gmail.com
CC: goodies-dev at xfce.org
Target Milestone: ---
Created attachment 7355
--> https://bugzilla.xfce.org/attachment.cgi?id=7355&action=edit
Fix enum type between GtkOrientation and XfcePanelPluginMode
Under FreeBSD with clang, it's default compiler (but also noticed on Fedora 26
with gcc 7.2.1) I get this message when I build xfce4-weather-plugin:
weather.c:2035:31: warning: implicit conversion from enumeration type
'XfcePanelPluginMode' to different enumeration type 'GtkOrientation'
[-Wenum-conversion]
data->panel_orientation = xfce_panel_plugin_get_mode(panel);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
weather.c:2038:34: warning: comparison of constant
'XFCE_PANEL_PLUGIN_MODE_DESKBAR' (2) with expression of type 'GtkOrientation'
is always false [-Wtautological-constant-out-of-range-compare]
(data->panel_orientation == XFCE_PANEL_PLUGIN_MODE_DESKBAR &&
~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
I suggest to use xfce_panel_plugin_get_orientation() function. It returns
GtkOrientation type (GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL).
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Goodies-dev
mailing list