Skip to content

Commit 582054f

Browse files
hillwoodrocmhduiy
authored andcommitted
fix: Fix incompatible function pointer types with g_timeout_add_full on GCC 15
GCC 15 enforces stricter type checking for function pointers, which caused compilation errors when passing `handle_tap` and `handle_tap_destroy` to `g_timeout_add_full`. These functions were declared without parameters, but must match the expected signatures: - GSourceFunc: gboolean (*)(gpointer) - GDestroyNotify: void (*)(gpointer) Log: This patch updates the function signatures to ensure compatibility without changing their runtime behavior, as the `gpointer` parameter is unused in both functions.
1 parent dc72a9b commit 582054f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

system/gesture1/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,15 @@ valid_long_press_touch(double x, double y)
296296
}
297297

298298
static gboolean
299-
handle_tap()
299+
handle_tap(gpointer data)
300300
{
301301
g_debug("[Tap] fingers: %d", raw->fingers);
302302
handleGestureEvent(GESTURE_TYPE_TAP, GESTURE_DIRECTION_NONE, raw->fingers);
303303
return FALSE;
304304
}
305305

306306
static void
307-
handle_tap_destroy()
307+
handle_tap_destroy(gpointer data)
308308
{
309309
if (raw && raw->tap_id) {
310310
raw->tap_id = 0;
@@ -696,4 +696,4 @@ void set_device_ignore(const char* node, bool ignore) {
696696
g_debug("[gesture] set device ignore: %s", ignore ? "true" : "false");
697697
rme->ignore = ignore;
698698
}
699-
}
699+
}

0 commit comments

Comments
 (0)