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

Unified Diff: crypto/symmetric_key_win.cc

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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
« no previous file with comments | « content/common/sandbox_win.cc ('k') | media/base/user_input_monitor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/symmetric_key_win.cc
diff --git a/crypto/symmetric_key_win.cc b/crypto/symmetric_key_win.cc
index e2dc9b4ae2d9256414eb1a3d632aed3889b96085..efc7fe4b8269b78ca46d1ab6b1795fc8157e7b3f 100644
--- a/crypto/symmetric_key_win.cc
+++ b/crypto/symmetric_key_win.cc
@@ -51,7 +51,7 @@ bool ImportRawKey(HCRYPTPROV provider,
ALG_ID alg,
const void* key_data, size_t key_size,
ScopedHCRYPTKEY* key) {
- DCHECK_GT(key_size, 0);
+ DCHECK_GT(key_size, 0u);
DWORD actual_size =
static_cast<DWORD>(sizeof(PlaintextBlobHeader) + key_size);
@@ -314,7 +314,7 @@ SymmetricKey::~SymmetricKey() {
// static
SymmetricKey* SymmetricKey::GenerateRandomKey(Algorithm algorithm,
size_t key_size_in_bits) {
- DCHECK_GE(key_size_in_bits, 8);
+ DCHECK_GE(key_size_in_bits, 8u);
ScopedHCRYPTPROV provider;
ScopedHCRYPTKEY key;
@@ -412,7 +412,7 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm,
// 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and stop.
size_t dkLen = key_size_in_bits / 8;
- DCHECK_GT(dkLen, 0);
+ DCHECK_GT(dkLen, 0u);
if ((dkLen / hLen) > 0xFFFFFFFF) {
DLOG(ERROR) << "Derived key too long.";
@@ -423,7 +423,7 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm,
// rounding up, and let r be the number of octets in the last
// block:
size_t L = (dkLen + hLen - 1) / hLen;
- DCHECK_GT(L, 0);
+ DCHECK_GT(L, 0u);
size_t total_generated_size = L * hLen;
std::vector<BYTE> generated_key(total_generated_size);
« no previous file with comments | « content/common/sandbox_win.cc ('k') | media/base/user_input_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698