Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Libyami fails to compile on GCC 7.1.1 #776

Closed
stripes416 opened this issue Jul 26, 2017 · 3 comments
Closed

Libyami fails to compile on GCC 7.1.1 #776

stripes416 opened this issue Jul 26, 2017 · 3 comments
Assignees
Labels

Comments

@stripes416
Copy link
Contributor

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
Copy link
Contributor

uartie commented Jul 26, 2017

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
Copy link
Contributor

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

@uartie
Copy link
Contributor

uartie commented Jul 27, 2017

google/googletest#1119

stripes416 added a commit to stripes416/libyami that referenced this issue Jul 28, 2017
Fixes intel#776: add explicit braces to avoid 'ambiguous else' warning.

Signed-off-by: Kelly Ledford <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants