! 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 !
use of deprecated glib/gio functions breaks build with debug=full
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Landry Breuil editbugs 2012-04-16 12:41:15 CEST
+++ This bug was initially created as a clone of Bug #8705 +++

See http://buildbot.xfce.org/builders/xfdesktop-openbsd/builds/381/steps/gmake/logs/stdio

- g_volume_eject,g_volume_eject_finish are deprecated since 2.22, http://developer.gnome.org/gio/unstable/GVolume.html#g-volume-eject
- g_mount_unmount,g_mount_unmount_finish are deprecated since 2.22, http://developer.gnome.org/gio/unstable/GMount.html#g-mount-unmount

All occurences :
xfdesktop-volume-icon.c: In function 'xfdesktop_volume_icon_eject_finish':
xfdesktop-volume-icon.c:476: warning: 'g_volume_eject_finish' is deprecated (declared at /usr/local/include/glib-2.0/gio/gvolume.h:214)
xfdesktop-volume-icon.c: In function 'xfdesktop_volume_icon_unmount_finish':
xfdesktop-volume-icon.c:518: warning: 'g_mount_unmount_finish' is deprecated (declared at /usr/local/include/glib-2.0/gio/gmount.h:186)
xfdesktop-volume-icon.c: In function 'xfdesktop_volume_icon_menu_toggle_mount':
xfdesktop-volume-icon.c:635: warning: 'g_volume_eject' is deprecated (declared at /usr/local/include/glib-2.0/gio/gvolume.h:209)
xfdesktop-volume-icon.c:643: warning: 'g_mount_unmount' is deprecated (declared at /usr/local/include/glib-2.0/gio/gmount.h:181)
Comment 1 Eric Koegel editbugs 2012-04-16 14:07:22 CEST
Created attachment 4330 
Switch away from deprecated glib/gio functions

This patch fixes those warnings as well as the one about
"strcpy() is almost always misused, please use strlcpy()".
I didn't do any compile time version checks because glib
minimum is 2.24 for xfce 4.10.
Comment 2 Landry Breuil editbugs 2012-04-16 14:12:19 CEST
(In reply to comment #1)
> Created attachment 4330 
> Switch away from deprecated glib/gio functions
> 
> This patch fixes those warnings as well as the one about
> "strcpy() is almost always misused, please use strlcpy()".

That one is openbsd-specific, no need to be 200% strict about it. Some of our developers like to put linker warnings like that for functions they consider unsafe..

> I didn't do any compile time version checks because glib
> minimum is 2.24 for xfce 4.10.

That's okay :)
Comment 3 Nick Schermer editbugs 2012-04-17 09:34:41 CEST
Patch is ok, but drop the strcpy, not needed.
Comment 4 Eric Koegel editbugs 2012-04-19 19:11:29 CEST
Dropped strlcpy & pushed to master: http://git.xfce.org/xfce/xfdesktop/commit/?id=790a972b7d3b895459491f7c6751611a4e9bc482

Bug #8710

Reported by:
Landry Breuil
Reported on: 2012-04-16
Last modified on: 2012-04-19

People

Assignee:
Eric Koegel
CC List:
3 users

Version

Attachments

Additional information