From e72fce7c8863a713628cc54446e90abd8d5f0bc8 Mon Sep 17 00:00:00 2001 From: sunghan Date: Mon, 27 Mar 2017 20:07:10 +0900 Subject: [PATCH] fix compilation warning on init The pid variable is only used when TASH or User Workqueue is enabled. --- apps/system/init/init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/system/init/init.c b/apps/system/init/init.c index dafb3e9..63647be 100644 --- a/apps/system/init/init.c +++ b/apps/system/init/init.c @@ -82,7 +82,9 @@ int main(int argc, FAR char *argv[]) int preapp_start(int argc, char *argv[]) #endif { +#if defined(CONFIG_LIB_USRWORK) || defined(CONFIG_TASH) int pid; +#endif #ifdef CONFIG_BUILD_PROTECTED #if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_PROCFS) @@ -122,6 +124,10 @@ int preapp_start(int argc, char *argv[]) } #endif +#if defined(CONFIG_LIB_USRWORK) || defined(CONFIG_TASH) error_out: return pid; +#else + return 0; +#endif } -- 2.7.4