mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
fix FTBS against recent xorg server tree
Recent xserver master moved out the BUG_*() macros from os.h, causing FTBS on xf86-input-synaptics: > synaptics.c: In function 'clickpad_guess_clickfingers': > synaptics.c:2638:5: error: implicit declaration of function 'BUG_RETURN_VAL' [-Werror=implicit-function-declaration] > 2638 | BUG_RETURN_VAL(hw->num_mt_mask > sizeof(close_point) * 8, 0); Since that macro is only used once, and that particular case deserves some more expressive error message anyways, it's trivial doing an explicit error printout here, instead of having to support the BUG_* macros as official module API on xserver side forever. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Reported-By: Peter Hutterer <peter.hutterer@who-t.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics/-/merge_requests/12>
This commit is contained in:
committed by
Alan Coopersmith
parent
89900bcf4d
commit
a0becc7957
@@ -2634,7 +2634,11 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv,
|
||||
uint32_t close_point = 0; /* 1 bit for each point close to another one */
|
||||
int i, j;
|
||||
|
||||
BUG_RETURN_VAL(hw->num_mt_mask > sizeof(close_point) * 8, 0);
|
||||
if (hw->num_mt_mask > sizeof(close_point) * 8) {
|
||||
ErrorFSigSafe("BUG: synaptics: hw->num_mt_mask too big %d\n", hw->num_mt_mask);
|
||||
xorg_backtrace();
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < hw->num_mt_mask - 1; i++) {
|
||||
ValuatorMask *f1;
|
||||
|
||||
Reference in New Issue
Block a user