! 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 !
xfce4-power-manager-1.6.1: compiler warning: control reaches end of non-void ...
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Stefan Seyfried 2017-12-19 20:53:40 CET
Created attachment 7503 
fix

After updating the source to 1.6.1, I get the following compiler warning:

xfpm-settings.c: In function 'format_light_locker_value_cb':
xfpm-settings.c:1512:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

The compiler is right. In case "value" is between 59.0 and 60.0, no return statement is triggered.

I used the attached patch to fix this for the openSUSE Package.
Comment 1 Git Bot editbugs 2017-12-19 22:16:17 CET
Stefan Seyfried referenced this bugreport in commit 7803611eab0034339d8293e5d4047231021137c4

Fix compiler warning (Bug #14104)

https://git.xfce.org/xfce/xfce4-power-manager/commit?id=7803611eab0034339d8293e5d4047231021137c4
Comment 2 Simon Steinbeiss editbugs 2017-12-19 22:17:15 CET
Indeed, both the compiler and you are right :)
Thanks for the patch, it's a simple fix.

Bug #14104

Reported by:
Stefan Seyfried
Reported on: 2017-12-19
Last modified on: 2017-12-19

People

Assignee:
Ali Abdallah
CC List:
3 users

Version

Attachments

fix (560 bytes, patch)
2017-12-19 20:53 CET , Stefan Seyfried
no flags

Additional information