OSDN Git Service

android: avoid compile warnnings oreo-x86 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-8.1-r6
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>
Mon, 20 May 2019 08:48:30 +0000 (16:48 +0800)
commitbf6c650c72a076b9976ba47dbff409508f0a0788
tree3992c4fb9e43480ebaff176ff894b1652985b772
parent8a3d57d2b9c5f998cae73e31129421de90db896c
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