From 92d38a3bb186634b864dec136b29c6a5133491d5 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 21 Nov 2022 10:22:52 +0800 Subject: [PATCH] Fix Error: nxtext_popup.c:250:20: error: unused function 'nxpu_puts' Signed-off-by: Xiang Xiao --- examples/nxtext/nxtext_popup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/nxtext/nxtext_popup.c b/examples/nxtext/nxtext_popup.c index 8e56aeb06..a4087779f 100644 --- a/examples/nxtext/nxtext_popup.c +++ b/examples/nxtext/nxtext_popup.c @@ -139,6 +139,7 @@ static inline int nxpu_setsize(NXWINDOW hwnd, FAR struct nxgl_size_s *size) printf("nxpu_setsize: nx_setsize failed: %d\n", errno); g_exitcode = NXEXIT_NXSETSIZE; } + return ret; } @@ -146,7 +147,8 @@ static inline int nxpu_setsize(NXWINDOW hwnd, FAR struct nxgl_size_s *size) * Name: nxpu_setposition ****************************************************************************/ -static inline int nxpu_setposition(NXWINDOW hwnd, FAR struct nxgl_point_s *pos) +static inline int nxpu_setposition(NXWINDOW hwnd, + FAR struct nxgl_point_s *pos) { int ret = nx_setposition(hwnd, pos); if (ret < 0) @@ -154,6 +156,7 @@ static inline int nxpu_setposition(NXWINDOW hwnd, FAR struct nxgl_point_s *pos) printf("nxpu_setposition: nx_setposition failed: %d\n", errno); g_exitcode = NXEXIT_NXSETPOSITION; } + return ret; } @@ -247,6 +250,7 @@ static void nxpu_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, * Name: nxpu_puts ****************************************************************************/ +#ifdef CONFIG_NX_KBD static inline void nxpu_puts(NXWINDOW hwnd, FAR struct nxtext_state_s *st, uint8_t nch, FAR const uint8_t *ch) { @@ -256,6 +260,7 @@ static inline void nxpu_puts(NXWINDOW hwnd, FAR struct nxtext_state_s *st, nxtext_putc(hwnd, st, g_puhfont, *ch++); } } +#endif /**************************************************************************** * Name: nxpu_kbdin @@ -392,5 +397,6 @@ int nxpu_close(NXWINDOW hwnd) g_exitcode = NXEXIT_NXCLOSEWINDOW; return ret; } + return OK; }