shithub: openh264

Download patch

ref: bcf102db83de2dcc6c01b4bcdf2c12e91610f551
parent: 616dc87feb637f72b881936e5d55d5ea78f5812a
author: Ethan Hugg <ehugg@cisco.com>
date: Mon Dec 16 06:36:54 EST 2013

Fixed warnings found by clang.  Removed some trailing whitespace.

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -1772,7 +1772,7 @@
 
 #if defined(MEMORY_MONITOR)
     assert (pMa->WelsGetMemoryUsage() == 0);	// ensure all memory free well
-#endif//MEMORY_MONITOR		
+#endif//MEMORY_MONITOR
 
     if ((*ppCtx)->pMemAlign != NULL) {
       WelsLog (NULL, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..\n",
@@ -2030,7 +2030,7 @@
 
   uiCpuCores	= pCodingParam->iMultipleThreadIdc;	// assigned uiCpuCores from iMultipleThreadIdc from SGE testing
 
-#endif//WELS_TESTBED	
+#endif//WELS_TESTBED
 
   uiCpuCores	= WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
 
@@ -2123,9 +2123,9 @@
   }
 
 #if defined(MEMORY_MONITOR)
-  WelsLog (pCtx, WELS_LOG_INFO, "WelsInitEncoderExt() exit, overall memory usage: %lu bytes\n",
-           sizeof (sWelsEncCtx) /* requested size from malloc() or new operator */
-           + pCtx->pMemAlign->WelsGetMemoryUsage()	/* requested size from CMemoryAlign::WelsMalloc() */
+  WelsLog (pCtx, WELS_LOG_INFO, "WelsInitEncoderExt() exit, overall memory usage: %u bytes\n",
+           (unsigned int) (sizeof (sWelsEncCtx) /* requested size from malloc() or new operator */
+           + pCtx->pMemAlign->WelsGetMemoryUsage())	/* requested size from CMemoryAlign::WelsMalloc() */
           );
 #endif//MEMORY_MONITOR
 
@@ -3522,7 +3522,7 @@
                    (pCtx->eSliceType == P_SLICE ? 'P' : 'I'),
                    eNalRefIdc,
                    iSliceSize);
-#endif//SLICE_INFO_OUTPUT						
+#endif//SLICE_INFO_OUTPUT
           ++ iNalIdxInLayer;
           ++ iSliceIdx;
         }
@@ -3758,7 +3758,7 @@
 
 #if defined(X86_ASM)
   WelsEmms();
-#endif //X86_ASM	
+#endif //X86_ASM
 
   return eFrameType;
 }
--- a/codec/encoder/core/src/utils.cpp
+++ b/codec/encoder/core/src/utils.cpp
@@ -157,7 +157,7 @@
 #endif//_MSC_VER
 #else//__GNUC__
       struct tm* t_now;
-#endif//WIN32			
+#endif//WIN32
 
 #if defined( WIN32 )
       struct _timeb tb;
@@ -172,7 +172,7 @@
         return;
       }
 #endif//_MSC_VER >= 1500
-#endif//_MSC_VER			
+#endif//_MSC_VER
       FTIME (&tb);
 #elif defined( __GNUC__ )
       struct timeval tv;
@@ -252,7 +252,7 @@
 #endif//_MSC_VER >= 1500
 #endif//_MSC_VER
 #elif defined (__GNUC__)
-        iCurUsed = SNPRINTF (&pBuf[iBufUsed], iBufLeft, ".%3.3u]: ", tv.tv_usec / 1000);	// confirmed_safe_unsafe_usage
+        iCurUsed = SNPRINTF (&pBuf[iBufUsed], iBufLeft, ".%3.3u]: ", (unsigned int) (tv.tv_usec / 1000));	// confirmed_safe_unsafe_usage
 #endif//WIN32
         if (iCurUsed >= 0) {
           iBufUsed += iCurUsed;