fix compilation warning on init
authorsunghan <sh924.chang@samsung.com>
Mon, 27 Mar 2017 11:07:10 +0000 (20:07 +0900)
committersunghan <sh924.chang@samsung.com>
Mon, 27 Mar 2017 11:07:10 +0000 (20:07 +0900)
The pid variable is only used when TASH or User Workqueue is enabled.

apps/system/init/init.c

index dafb3e9..63647be 100644 (file)
@@ -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
 }