]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blobdiff - test/armv7/linux/rm_server_osal.c
Resolved code review comments and -Wall -Wexta warnings
[keystone-rtos/rm-lld.git] / test / armv7 / linux / rm_server_osal.c
index 8f18f10bf08f5d8fc672e525fdc5396105a6f8df..d411435d53083a1bdedf66bb8677a9f986af1ad3 100644 (file)
  *  \par
 */
 
+/* 
+ * Shut off: remark #880-D: parameter "CsHandle, mtSemObj, etc." are function
+ *           input parameters but not referenced if the OSAL function is not
+ *           used.
+ *
+ * The input arguments can't be removed without breaking the OSAL usage
+ */
+#ifdef _TMS320C6X
+#pragma diag_suppress 880
+#pragma diag_suppress 681
+#elif defined(__GNUC__)
+/* Same for GCC:
+ * warning: unused parameter CsHandle, mtSemObj, etc. [-Wunused-parameter]
+ */
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
 /* Standard Includes */
 #include <stdint.h>
 #include <stdarg.h>
@@ -83,8 +100,8 @@ void *Osal_rmMalloc (uint32_t num_bytes)
     rmMallocCounter++;
     rmByteAlloc += num_bytes;
 
-       /* Allocate memory. */
-       return calloc(1, num_bytes);
+    /* Allocate memory. */
+    return calloc(1, num_bytes);
 }
 
 /* FUNCTION PURPOSE: Frees memory
@@ -97,7 +114,7 @@ void Osal_rmFree (void *ptr, uint32_t size)
     /* Increment the free counter. */
     rmFreeCounter++;
     rmByteFree += size;
-       free(ptr);
+    free(ptr);
 }
 
 /* FUNCTION PURPOSE: Critical section enter
@@ -235,7 +252,7 @@ void Osal_rmLog (char *fmt, ... )
 
     /* logfile reset if going over max_len */
     if (fstat(fileno(rmsrv_cfg.logfile_p), &fbuf) == 0) {
-        if ((fbuf.st_size + strlen(rmsrv_log_buf)) > rmsrv_cfg.logfile_max_len) {
+        if ((fbuf.st_size + ((int)strlen(rmsrv_log_buf))) > rmsrv_cfg.logfile_max_len) {
             freopen(RMSERVER_DAEMON_LOG_FILE_NAME, "w+", rmsrv_cfg.logfile_p);
         }
     }