Fix build warnings in logm
authorAhreum Jeong <ahreum.jeong@samsung.com>
Fri, 1 Sep 2017 04:55:12 +0000 (13:55 +0900)
committerAhreum Jeong <ahreum.jeong@samsung.com>
Fri, 1 Sep 2017 05:59:41 +0000 (14:59 +0900)
- Add missing include header
   . logm.c : sched.h for sched_lock/unlock, tinyara/arch.h for up_interrupt_context
   . logm_tashcmds.c : string.h for strcmp
- Delete logm_tash definition from logm.h because it is used in a file only

os/logm/logm.c
os/logm/logm.h
os/logm/logm_tashcmds.c

index 2700487..2522088 100644 (file)
  *
  ****************************************************************************/
 
+#include <tinyara/config.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <unistd.h>
+#ifdef CONFIG_ARCH_LOWPUTC
+#include <sched.h>
+#endif
 #include <arch/irq.h>
-#include <tinyara/config.h>
+#include <tinyara/arch.h>
 #include <tinyara/logm.h>
 #include <tinyara/streams.h>
 #ifdef CONFIG_LOGM_TIMESTAMP
index f36711d..8085c3a 100644 (file)
@@ -80,7 +80,6 @@ EXTERN volatile int logm_print_interval;
  ************************************************************************************/
 int logm_task(int argc, char *argv[]);
 void logm_register_tashcmds(void);
-static int logm_tash(int argc, char **args);
 
 #undef EXTERN
 #if defined(__cplusplus)
index 521348e..1e64fcd 100644 (file)
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <string.h>
 #include <apps/shell/tash.h>
 #include <tinyara/logm.h>
 #include "logm.h"
 
+static int logm_tash(int argc, char **args);
+
 const static tash_cmdlist_t logm_tashmds[] = {
        {"logm", logm_tash, TASH_EXECMD_SYNC},
        {NULL, NULL, 0}