ref: b2dafa5a9277c66c9ad942e59104c235b3a5c1e1
parent: fff39090530ef03520008d26189fd70b83aa4a3d
author: Licai Guo <[email protected]>
date: Sun Mar 9 14:12:53 EDT 2014
fix WELS_READ_VERIFY
--- a/codec/decoder/core/inc/dec_golomb.h
+++ b/codec/decoder/core/inc/dec_golomb.h
@@ -49,10 +49,11 @@
namespace WelsDec {
-#define WELS_READ_VERIFY(uiRet) { \
- if( uiRet != ERR_NONE ) \
- return uiRet; \
-}
+#define WELS_READ_VERIFY(uiRet) do{ \
+ uint32_t uiRetTmp = (uint32_t)uiRet; \
+ if( uiRetTmp != ERR_NONE ) \
+ return uiRetTmp; \
+}while(0)
#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
if (iReadBytes > iAllowedBytes+1) { \
return ERR_INFO_READ_OVERFLOW; \