Clean Up Warnings in Android Glue Code

(This is a merge of go/wvgerrit/24739)

This cleans up some warnings in the Android glue code:

1) Checking if unsigned values are >= 0.
2) Using {0} initializer syntax instead of fully expanding to {0,0}.

Bug: 34394125
Test: Verified compilation passes
Change-Id: Id59730b97da7fce320f634451a44a4df4bf0b494
This commit is contained in:
John W. Bruce
2017-03-22 11:08:32 -07:00
parent c4aad89fd0
commit 92d26ff87e
2 changed files with 5 additions and 16 deletions

View File

@@ -256,7 +256,7 @@ TEST_F(WVCryptoPluginTest, AttemptsToDecrypt) {
}
WVCryptoPlugin plugin(sessionId, kSessionIdSize, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res = plugin.decrypt(false, keyId, iv[0], CryptoPlugin::kMode_AES_CTR,
@@ -310,7 +310,7 @@ TEST_F(WVCryptoPluginTest, CommunicatesSecureBufferRequest) {
}
WVCryptoPlugin plugin(sessionId, kSessionIdSize, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res = plugin.decrypt(false, keyId, iv, CryptoPlugin::kMode_AES_CTR,
@@ -385,7 +385,7 @@ TEST_F(WVCryptoPluginTest, SetsFlagsForMinimumSubsampleRuns) {
}
WVCryptoPlugin plugin(sessionId, kSessionIdSize, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res = plugin.decrypt(false, keyId, iv, CryptoPlugin::kMode_AES_CTR,
@@ -461,7 +461,7 @@ TEST_F(WVCryptoPluginTest, AllowsSessionIdChanges) {
uint8_t blank[1]; // Some compilers will not accept 0.
WVCryptoPlugin plugin(blank, 0, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res;