intel / libyami

Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.
Apache License 2.0
147 stars 106 forks source link

Libyami fails to compile on GCC 7.1.1 #776

Closed stripes416 closed 7 years ago

stripes416 commented 7 years ago
22:29:39,668 INFO  - vaapipostprocess_scaler_unittest.cpp: In static member function 'static void YamiMediaCodec::VaapiPostProcessScalerTest::checkColorBalanceFilter(YamiMediaCodec::VaapiPostProcessScaler&, VppColorBalanceMode)':
22:29:39,668 INFO  - vaapipostprocess_scaler_unittest.cpp:110:12: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=dangling-else]
22:29:39,668 INFO  - if (COLORBALANCE_NONE != mode)
22:29:39,668 INFO  - ^
uartie commented 7 years ago

This is a side-effect from the GTEST macros not enclosing the entire macro definition inside braces. We should only have to add braces in our if statement to fix this (e.g. if(...) { ... })

xuguangxin commented 7 years ago

Hi @stripes416 , could you help prepare a patch for this?

uartie commented 7 years ago

https://github.com/google/googletest/issues/1119