From: sunghan Date: Mon, 27 Mar 2017 11:07:10 +0000 (+0900) Subject: fix compilation warning on init X-Git-Tag: 1.1_Public_Release~647^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e72fce7c8863a713628cc54446e90abd8d5f0bc8;p=rtos%2Ftinyara.git fix compilation warning on init The pid variable is only used when TASH or User Workqueue is enabled. --- 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 }