resolve trivial issues found by cppcheck
authorIlya Shipitsin <chipitsine@gmail.com>
Fri, 17 Feb 2017 13:36:03 +0000 (18:36 +0500)
committerIlya Shipitsin <chipitsine@gmail.com>
Fri, 17 Feb 2017 13:36:03 +0000 (18:36 +0500)
[libfreerdp/primitives/prim_add_opt.c:43]: (error) Uninitialized variable: shifts
[libfreerdp/primitives/prim_andor_opt.c:42]: (error) Uninitialized variable: shifts
[libfreerdp/primitives/prim_andor_opt.c:44]: (error) Uninitialized variable: shifts
[libfreerdp/primitives/prim_shift_opt.c:42]: (error) Uninitialized variable: shifts
[libfreerdp/primitives/prim_shift_opt.c:45]: (error) Uninitialized variable: shifts
[libfreerdp/primitives/prim_shift_opt.c:48]: (error) Uninitialized variable: shifts
[libfreerdp/primitives/prim_shift_opt.c:51]: (error) Uninitialized variable: shifts

libfreerdp/primitives/prim_templates.h

index 84d586f..ba2405c 100644 (file)
@@ -46,7 +46,7 @@
 #define SSE3_SCD_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
        static pstatus_t _name_(const _type_ *pSrc, UINT32 val, _type_ *pDst, UINT32 len) \
     { \
-           INT32 shifts; \
+           INT32 shifts = 0; \
            UINT32 offBeatMask; \
            const _type_ *sptr = pSrc; \
            _type_ *dptr = pDst; \
 #define SSE3_SCD_PRE_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
        pstatus_t _name_(const _type_ *pSrc, _type_ val, _type_ *pDst, INT32 len) \
     { \
-           int shifts; \
+           int shifts = 0; \
            UINT32 offBeatMask; \
            const _type_ *sptr = pSrc; \
            _type_ *dptr = pDst; \
 #define SSE3_SSD_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
        pstatus_t _name_(const _type_ *pSrc1, const _type_ *pSrc2, _type_ *pDst, UINT32 len) \
     { \
-           int shifts; \
+           int shifts = 0; \
            UINT32 offBeatMask; \
            const _type_ *sptr1 = pSrc1; \
            const _type_ *sptr2 = pSrc2; \