OSDN Git Service

android: avoid compile warnnings pie-x86 q-x86 r-x86 android-x86-9.0-r1 android-x86-9.0-r2
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 26 Feb 2019 03:27:33 +0000 (11:27 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 26 Feb 2019 03:27:33 +0000 (11:27 +0800)
commita9d2c1f0e21041163a252a023bfaad3e929be5ab
tree3c2eb268c372cec435a51d40c34c5e8a3c49e716
parent8ebbabfcd14e570ded61d14ff667f63b40810f95
android: avoid compile warnnings

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>
src/gen75_vme.c
src/gen9_vme.c