0003-wminput-plugins-led-led.c-fix-build-with-gcc-14.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 10106fdb4cc833faa3c2fcb980d0a4eb121fe19d Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Tue, 23 Jul 2024 10:31:32 +0200
  4. Subject: [PATCH] wminput/plugins/led/led.c: fix build with gcc >= 14
  5. Fix the following build failure with gcc >= 14:
  6. led.c: In function 'wmplugin_exec':
  7. led.c:86:42: error: assignment to 'struct cwiid_btn_message *' from incompatible pointer type 'struct cwiid_btn_mesg *' [-Wincompatible-pointer-types]
  8. 86 | btn_mesg = &mesg[i].btn_mesg;
  9. | ^
  10. Fixes:
  11. - http://autobuild.buildroot.org/results/a3bde74ff2137d088f4261e62930859bfe460cb9
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. Upstream: https://github.com/abstrakraft/cwiid/pull/47
  14. ---
  15. wminput/plugins/led/led.c | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17. diff --git a/wminput/plugins/led/led.c b/wminput/plugins/led/led.c
  18. index 93b96d9..591f365 100644
  19. --- a/wminput/plugins/led/led.c
  20. +++ b/wminput/plugins/led/led.c
  21. @@ -72,7 +72,7 @@ struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
  22. {
  23. int i;
  24. uint8_t button;
  25. - struct cwiid_btn_message *btn_mesg;
  26. + struct cwiid_btn_mesg *btn_mesg;
  27. uint8_t led_state = (Led1 ? CWIID_LED1_ON : 0)
  28. | (Led2 ? CWIID_LED2_ON : 0)
  29. --
  30. 2.43.0