From 90b269568b362b284af81c77537eb58413a04cf3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 30 Dec 2013 14:09:58 -0600 Subject: [PATCH] Fix some minor kernel mose NxWM build issues --- include/nuttx/nx/nx.h | 2 +- libc/wqueue/work_usrstart.c | 10 ++++------ libnx/nxmu/nx_redrawreq.c | 9 ++------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/include/nuttx/nx/nx.h b/include/nuttx/nx/nx.h index 27c738d41d..96584db7d8 100644 --- a/include/nuttx/nx/nx.h +++ b/include/nuttx/nx/nx.h @@ -294,7 +294,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev); * ****************************************************************************/ -#if defined(CONFIG_NX_MULTIUSER) && defined(CONFIG_NX_START) +#if defined(CONFIG_NX_MULTIUSER) && defined(CONFIG_NX_NXSTART) int nx_start(void); #endif diff --git a/libc/wqueue/work_usrstart.c b/libc/wqueue/work_usrstart.c index 5b51931c63..696bf04aab 100644 --- a/libc/wqueue/work_usrstart.c +++ b/libc/wqueue/work_usrstart.c @@ -88,10 +88,6 @@ int work_usrstart(void) { - int errcode; - - DEBUGASSERT(g_usrwork[USRWORK] == NULL); - /* Start a user-mode worker thread for use by applications. */ svdbg("Starting user-mode worker thread\n"); @@ -102,10 +98,12 @@ int work_usrstart(void) (main_t)work_usrthread, (FAR char * const *)NULL); - errcode = errno; - ASSERT(g_usrwork[USRWORK].pid > 0); + DEBUGASSERT(g_usrwork[USRWORK].pid > 0); if (g_usrwork[USRWORK].pid < 0) { + int errcode = errno; + DEBUGASSERT(errcode > 0); + sdbg("task_create failed: %d\n", errcode); return -errcode; } diff --git a/libnx/nxmu/nx_redrawreq.c b/libnx/nxmu/nx_redrawreq.c index 6621bb8a13..ed0e639096 100644 --- a/libnx/nxmu/nx_redrawreq.c +++ b/libnx/nxmu/nx_redrawreq.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -94,13 +95,7 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect) struct nxsvrmsg_redrawreq_s outmsg; int ret; -#ifdef CONFIG_DEBUG - if (!wnd || !rect) - { - set_errno(EINVAL); - return ERROR; - } -#endif + DEBUGASSERT(wnd && rect); /* Inform the server of the changed position */