• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/vaapi


Commit MetaInfo

Revisãoa9d2c1f0e21041163a252a023bfaad3e929be5ab (tree)
Hora2019-02-26 12:27:33
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Mensagem de Log

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>

Mudança Sumário

Diff

--- a/src/gen75_vme.c
+++ b/src/gen75_vme.c
@@ -1070,6 +1070,7 @@ Bool gen75_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *
10701070 default:
10711071 /* never get here */
10721072 assert(0);
1073+ i965_kernel_num = 0;
10731074
10741075 break;
10751076 }
--- a/src/gen9_vme.c
+++ b/src/gen9_vme.c
@@ -2036,6 +2036,7 @@ Bool gen9_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *e
20362036 default:
20372037 /* never get here */
20382038 assert(0);
2039+ i965_kernel_num = 0;
20392040
20402041 break;
20412042 }