mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-02-05 06:30:26 +01:00
building natively on OpenBSD with clang 13, i get those warnings:
../src/up-device-battery.c:128:53: warning: absolute value function 'abs' given an argument of type 'gint64' (aka 'long long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
if (abs(UP_DAEMON_LONG_TIMEOUT * G_USEC_PER_SEC - abs (td)) > abs(UP_DAEMON_SHORT_TIMEOUT * G_USEC_PER_SEC - ref_td))
^
../src/up-device-battery.c:128:53: note: use function 'llabs' instead
if (abs(UP_DAEMON_LONG_TIMEOUT * G_USEC_PER_SEC - abs (td)) > abs(UP_DAEMON_SHORT_TIMEOUT * G_USEC_PER_SEC - ref_td))
^~~
llabs
../src/up-device-battery.c:128:65: warning: absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
if (abs(UP_DAEMON_LONG_TIMEOUT * G_USEC_PER_SEC - abs (td)) > abs(UP_DAEMON_SHORT_TIMEOUT * G_USEC_PER_SEC - ref_td))
^
../src/up-device-battery.c:128:65: note: use function 'llabs' instead
if (abs(UP_DAEMON_LONG_TIMEOUT * G_USEC_PER_SEC - abs (td)) > abs(UP_DAEMON_SHORT_TIMEOUT * G_USEC_PER_SEC - ref_td))
^~~
llabs
|
||
|---|---|---|
| .. | ||
| bsd | ||
| dummy | ||
| freebsd | ||
| linux | ||
| openbsd | ||
| meson.build | ||
| org.freedesktop.UPower.conf.in | ||
| org.freedesktop.UPower.service.in | ||
| up-backend-bsd-private.h | ||
| up-backend.h | ||
| up-common.c | ||
| up-common.h | ||
| up-config.c | ||
| up-config.h | ||
| up-constants.h | ||
| up-daemon.c | ||
| up-daemon.h | ||
| up-device-battery.c | ||
| up-device-battery.h | ||
| up-device-list.c | ||
| up-device-list.h | ||
| up-device.c | ||
| up-device.h | ||
| up-enumerator.c | ||
| up-enumerator.h | ||
| up-history.c | ||
| up-history.h | ||
| up-kbd-backlight.c | ||
| up-kbd-backlight.h | ||
| up-main.c | ||
| up-native.h | ||
| up-self-test.c | ||
| upower.service.in | ||