Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile warnings (errors) in Android 9 #446

Merged
merged 2 commits into from
Mar 7, 2019
Merged

Conversation

cwhuang
Copy link
Contributor

@cwhuang cwhuang commented Feb 26, 2019

Android 9 enforces more stricter compile rules that treat most warnings as errors. The patches make the master branch buildable in Android 9.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
To avoid the warnings(errors):

hardware/intel/common/vaapi/src/gen75_vme.c:1070:5: error: variable 'i965_kernel_num' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
    default:
    ^~~~~~~
hardware/intel/common/vaapi/src/gen75_vme.c:1078:35: note: uninitialized use occurs here
    vme_context->vme_kernel_sum = i965_kernel_num;
                                  ^~~~~~~~~~~~~~~

hardware/intel/common/vaapi/src/gen9_vme.c:2036:5: error: variable 'i965_kernel_num' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
    default:
    ^~~~~~~
hardware/intel/common/vaapi/src/gen9_vme.c:2044:35: note: uninitialized use occurs here
    vme_context->vme_kernel_sum = i965_kernel_num;
                                  ^~~~~~~~~~~~~~~

I am not going to disable the warning (by -Wno-sometimes-uninitialized)
since it's still a useful checking from the compiler.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
@xhaihao xhaihao merged commit bf17e8c into intel:master Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants