! 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 !
Fix build with clang, (non-void function should return a value [-Wreturn-type])
Status:
RESOLVED: FIXED
Product:
Xfce4-pulseaudio-plugin
Component:
General

Comments

Description Olivier Duchateau 2017-09-29 20:53:08 CEST
Created attachment 7335 
Patch to fix build with clang

With the latest release (0.3.1) xfce4-pulseaudio-plugin fails to build with clang (it's default compiler on FreeBSD for Tiers-1 architectures arm, i386 and amd64). Patch fixes this issue, otherwise I get this error:

pulseaudio-volume.c:813:3: error: non-void function 'pulseaudio_volume_get_outpu
t_list' should return a value [-Wreturn-type]
  g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
  ^
/usr/local/include/glib-2.0/glib/gmessages.h:582:3: note: expanded from macro 'g
_return_if_fail'
         return;                                                        \
         ^
pulseaudio-volume.c:827:3: error: non-void function 'pulseaudio_volume_get_outpu
t_by_name' should return a value [-Wreturn-type]
  g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
  ^
/usr/local/include/glib-2.0/glib/gmessages.h:582:3: note: expanded from macro 'g
_return_if_fail'
         return;
         ^
pulseaudio-volume.c:839:3: error: non-void function 'pulseaudio_volume_get_input
_list' should return a value [-Wreturn-type]
  g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
         ^
pulseaudio-volume.c:853:3: error: non-void function 'pulseaudio_volume_get_input
_by_name' should return a value [-Wreturn-type]
  g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
  ^
/usr/local/include/glib-2.0/glib/gmessages.h:582:3: note: expanded from macro 'g
_return_if_fail'
         return;                                                        \
         ^
4 errors generated.
Comment 1 Git Bot editbugs 2017-10-14 14:29:43 CEST
Olivier Duchateau referenced this bugreport in commit abdc05acdf5315f01d01b73ef21f47a270aa81db

Fix build with clang (non-void function should return a value [-Wreturn-type]) (bug #13889)

https://git.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/commit?id=abdc05acdf5315f01d01b73ef21f47a270aa81db
Comment 2 Sean Davis editbugs 2017-10-14 14:30:13 CEST
Thanks for the patch!

Bug #13889

Reported by:
Olivier Duchateau
Reported on: 2017-09-29
Last modified on: 2017-10-14

People

Assignee:
Andrzej
CC List:
1 user

Version

Version:
unspecified

Attachments

Patch to fix build with clang (1.96 KB, patch)
2017-09-29 20:53 CEST , Olivier Duchateau
no flags

Additional information