Undefined return value in some functions when g-s-d is compiled with G_DISABLE_ASSERT
Submitted by Dominique Leuenberger
Link to original bug (#793253)
Description
Just prepared the upgrade for g-s-d 3.27.90 (migrated to meson, included the two commits post 3.27.90 tag) and the openSUSE build root policy checker raises there issues:
[ 57s] I: Program returns random data in a function [ 57s] E: gnome-settings-daemon no-return-in-nonvoid-function ../plugins/media-keys/gsd-media-keys-manager.c:338, 356 [ 57s] E: gnome-settings-daemon no-return-in-nonvoid-function ../plugins/rfkill/rfkill-glib.c:258 [ 57s] E: gnome-settings-daemon no-return-in-nonvoid-function ../plugins/xsettings/xsettings-manager.c:273
These are known compiler warnings elevated to errors; the compiler log contains
[ 31s] ../plugins/media-keys/gsd-media-keys-manager.c: In function ‘get_key_string’: [ 31s] ../plugins/media-keys/gsd-media-keys-manager.c:338:1: warning: control reaches end of non-void function [-Wreturn-type] [ 31s] } [ 31s] ^ [ 31s] ../plugins/media-keys/gsd-media-keys-manager.c: In function ‘get_binding’: [ 31s] ../plugins/media-keys/gsd-media-keys-manager.c:356:1: warning: control reaches end of non-void function [-Wreturn-type]
(as example)
Version: 3.27.x