Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-intel-common-vaapi: Commit

hardware/intel/common/vaapi


Commit MetaInfo

Révisionbf6c650c72a076b9976ba47dbff409508f0a0788 (tree)
l'heure2019-05-20 17:48:30
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message 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>

Change Summary

Modification

--- 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 }
Afficher sur ancien navigateur de dépôt.