Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: firmware/lib/vboot_common.c

Issue 2851015: Fixes to compiler warnings in MSVC (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Also fix gpt numbering bug Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: firmware/lib/vboot_common.c
diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c
index f76eed45abc0655a93c77099e171773f6365ef0e..a944c70b9b512f53697b37c68bb7f2899f493424 100644
--- a/firmware/lib/vboot_common.c
+++ b/firmware/lib/vboot_common.c
@@ -112,16 +112,16 @@ RSAPublicKey* PublicKeyToRSA(const VbPublicKey* key) {
debug("Invalid algorithm.\n");
return NULL;
}
- if (RSAProcessedKeySize(key->algorithm) != key->key_size) {
+ if (RSAProcessedKeySize((int)key->algorithm) != (int)key->key_size) {
gauravsh 2010/06/21 23:32:48 so what is the data type for algorithm? I saw uint
debug("Wrong key size for algorithm\n");
return NULL;
}
- rsa = RSAPublicKeyFromBuf(GetPublicKeyDataC(key), key->key_size);
+ rsa = RSAPublicKeyFromBuf(GetPublicKeyDataC(key), (int)key->key_size);
if (!rsa)
return NULL;
- rsa->algorithm = key->algorithm;
+ rsa->algorithm = (int)key->algorithm;
return rsa;
}
@@ -190,7 +190,8 @@ int KeyBlockVerify(const VbKeyBlockHeader* block, uint64_t size,
return VBOOT_KEY_BLOCK_INVALID;
}
- if (!((rsa = PublicKeyToRSA(key)))) {
+ rsa = PublicKeyToRSA(key);
+ if (!rsa) {
debug("Invalid public key\n");
return VBOOT_PUBLIC_KEY_INVALID;
}

Powered by Google App Engine
This is Rietveld 408576698