This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit f0fc695a81cc4c3f12ec9e0624f3948c34f331a4
Author: zhenwei fang <[email protected]>
AuthorDate: Tue Aug 5 17:17:57 2025 +0800

    arch/sim: fix warning ‘sim_buttonmap’ defined but not used
    
    N/A
    
    Signed-off-by: zhenwei fang <[email protected]>
    Signed-off-by: chao an <[email protected]>
---
 arch/sim/src/sim/posix/sim_x11eventloop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/sim/src/sim/posix/sim_x11eventloop.c 
b/arch/sim/src/sim/posix/sim_x11eventloop.c
index 5539293ddf2..15d8cd0ddcf 100644
--- a/arch/sim/src/sim/posix/sim_x11eventloop.c
+++ b/arch/sim/src/sim/posix/sim_x11eventloop.c
@@ -46,6 +46,7 @@ extern Display *g_display;
  * Name: sim_buttonmap
  ****************************************************************************/
 
+#ifdef CONFIG_SIM_TOUCHSCREEN
 static int sim_buttonmap(int state, int button)
 {
   int buttons = 0;
@@ -88,6 +89,7 @@ static int sim_buttonmap(int state, int button)
 
   return buttons;
 }
+#endif
 
 /****************************************************************************
  * Public Functions

Reply via email to