! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] Fix build with clang for enum type GtkOrientation and XfcePanelPlugin...
Status:
RESOLVED: MOVED
Product:
Xfce4-weather-plugin
Component:
General

Comments

Description Olivier Duchateau 2017-10-12 19:45:55 CEST
Created attachment 7355 
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).
Comment 1 Git Bot editbugs 2020-05-23 01:08:10 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin/-/issues/7.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #13915

Reported by:
Olivier Duchateau
Reported on: 2017-10-12
Last modified on: 2020-05-23

People

Assignee:
Harald Judt
CC List:
2 users

Version

Version:
0.8.10

Attachments

Additional information