[PATCH libinput] tablet: remove C++ static_assert

Baruch Siach baruch at tkos.co.il
Sun May 15 03:03:14 UTC 2016


static_assert() is C++ only. Build may fail with:

  CCLD     event-debug
../src/.libs/libinput.so: undefined reference to `static_assert'
collect2: error: ld returned 1 exit status

Use just assert() like the rest of the code.

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 src/evdev-tablet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 4e8b920a3ec8..f4adc0c39f82 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -1187,9 +1187,7 @@ static void
 tablet_mark_all_axes_changed(struct tablet_dispatch *tablet,
 			     struct libinput_tablet_tool *tool)
 {
-	static_assert(sizeof(tablet->changed_axes) ==
-			      sizeof(tool->axis_caps),
-		      "Mismatching array sizes");
+	assert(sizeof(tablet->changed_axes) == sizeof(tool->axis_caps));
 
 	memcpy(tablet->changed_axes,
 	       tool->axis_caps,
-- 
2.8.1



More information about the wayland-devel mailing list