hardware/intel/common/vaapi
Revisão | a9d2c1f0e21041163a252a023bfaad3e929be5ab (tree) |
---|---|
Hora | 2019-02-26 12:27:33 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
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]
hardware/intel/common/vaapi/src/gen75_vme.c:1078:35: note: uninitialized use occurs here
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]
hardware/intel/common/vaapi/src/gen9_vme.c:2044:35: note: uninitialized use occurs here
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>
@@ -1070,6 +1070,7 @@ Bool gen75_vme_context_init(VADriverContextP ctx, struct intel_encoder_context * | ||
1070 | 1070 | default: |
1071 | 1071 | /* never get here */ |
1072 | 1072 | assert(0); |
1073 | + i965_kernel_num = 0; | |
1073 | 1074 | |
1074 | 1075 | break; |
1075 | 1076 | } |
@@ -2036,6 +2036,7 @@ Bool gen9_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *e | ||
2036 | 2036 | default: |
2037 | 2037 | /* never get here */ |
2038 | 2038 | assert(0); |
2039 | + i965_kernel_num = 0; | |
2039 | 2040 | |
2040 | 2041 | break; |
2041 | 2042 | } |