Intel-Media-SDK / MediaSDK

The Intel® Media SDK
MIT License
932 stars 458 forks source link

clang-11 gives a number of warnings #2030

Closed dvrogozh closed 4 years ago

dvrogozh commented 4 years ago

Tried self-build clang-11 (very tip of clang master branch):

/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:87:19: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct
                  ^
                   ExtVASurface
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:89:31: note: type is not C-compatible due to this default member initializer
        VASurfaceID surface = VA_INVALID_SURFACE;
                              ^~~~~~~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1275:28: note: expanded from macro 'VA_INVALID_SURFACE'
#define VA_INVALID_SURFACE      VA_INVALID_ID
                                ^~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1274:24: note: expanded from macro 'VA_INVALID_ID'
#define VA_INVALID_ID           0xffffffff
                                ^~~~~~~~~~
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:98:7: note: type is given name 'ExtVASurface' for linkage purposes by this typedef declaration
    } ExtVASurface;
      ^
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:87:19: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct
                  ^
                   ExtVASurface
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:89:31: note: type is not C-compatible due to this default member initializer
        VASurfaceID surface = VA_INVALID_SURFACE;
                              ^~~~~~~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1275:28: note: expanded from macro 'VA_INVALID_SURFACE'
#define VA_INVALID_SURFACE      VA_INVALID_ID
                                ^~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1274:24: note: expanded from macro 'VA_INVALID_ID'
#define VA_INVALID_ID           0xffffffff
                                ^~~~~~~~~~
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:98:7: note: type is given name 'ExtVASurface' for linkage purposes by this typedef declaration
    } ExtVASurface;
      ^
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:87:19: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct
                  ^
                   ExtVASurface
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:89:31: note: type is not C-compatible due to this default member initializer
        VASurfaceID surface = VA_INVALID_SURFACE;
                              ^~~~~~~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1275:28: note: expanded from macro 'VA_INVALID_SURFACE'
#define VA_INVALID_SURFACE      VA_INVALID_ID
                                ^~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1274:24: note: expanded from macro 'VA_INVALID_ID'
#define VA_INVALID_ID           0xffffffff
                                ^~~~~~~~~~
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:98:7: note: type is given name 'ExtVASurface' for linkage purposes by this typedef declaration
    } ExtVASurface;
      ^
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:87:19: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct
                  ^
                   ExtVASurface
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:89:31: note: type is not C-compatible due to this default member initializer
        VASurfaceID surface = VA_INVALID_SURFACE;
                              ^~~~~~~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1275:28: note: expanded from macro 'VA_INVALID_SURFACE'
#define VA_INVALID_SURFACE      VA_INVALID_ID
                                ^~~~~~~~~~~~~
/opt/intel/git/install/include/va/va.h:1274:24: note: expanded from macro 'VA_INVALID_ID'
#define VA_INVALID_ID           0xffffffff
                                ^~~~~~~~~~
/opt/intel/git/msdk/_studio/mfx_lib/shared/include/mfx_h264_encode_vaapi.h:98:7: note: type is given name 'ExtVASurface' for linkage purposes by this typedef declaration
    } ExtVASurface;
      ^

/opt/intel/git/msdk/_studio/mfx_lib/vpp/src/mfx_vpp_hw.cpp:6276:69: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
    if (true == executeParams.bSceneDetectionEnable && (FRC_ENABLED | config.m_extConfig.mode))
                                                        ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

/opt/intel/git/msdk/_studio/mfx_lib/encode_hw/h265/src/mfx_h265_encode_hw_utils.cpp:2810:9: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
        if (((fo + 1) % gopPicSize == 0 && (gopOptFlag & MFX_GOP_CLOSED)) ||
        ^
/opt/intel/git/msdk/_studio/mfx_lib/encode_hw/h265/src/mfx_h265_encode_hw_utils.cpp:2806:5: note: previous statement is here
    if (fo % gopPicSize % gopRefDist == 0)
    ^

/opt/intel/git/msdk/_studio/mfx_lib/shared/src/mfx_vc1_dec_common.cpp:124:60: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
                if (mask != MFX_IOPATTERN_OUT_VIDEO_MEMORY || mask != MFX_IOPATTERN_OUT_SYSTEM_MEMORY || mask != MFX_IOPATTERN_OUT_OPAQUE_MEMORY)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/opt/intel/git/msdk/_studio/mfx_lib/shared/src/mfx_vc1_dec_common.cpp:124:60: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
                if (mask != MFX_IOPATTERN_OUT_VIDEO_MEMORY || mask != MFX_IOPATTERN_OUT_SYSTEM_MEMORY || mask != MFX_IOPATTERN_OUT_OPAQUE_MEMORY)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmitryermilov commented 4 years ago

@dvrogozh , would you like to assign it?