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

Unified Diff: crypto/ec_signature_creator_nss.cc

Issue 10451068: Fixing gcc 4.7 building problems. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Modified per Adam's comments Created 8 years, 7 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: crypto/ec_signature_creator_nss.cc
diff --git a/crypto/ec_signature_creator_nss.cc b/crypto/ec_signature_creator_nss.cc
index 388870f7fa8cf5aa6f792a3326f8227fe7d0a74a..21c192fa173f81266de5202e827d97a222ca77e4 100644
--- a/crypto/ec_signature_creator_nss.cc
+++ b/crypto/ec_signature_creator_nss.cc
@@ -8,6 +8,7 @@
#include <pk11pub.h>
#include <secerr.h>
#include <sechash.h>
+#include <unistd.h>
#include "base/logging.h"
#include "crypto/ec_private_key.h"
@@ -34,12 +35,14 @@ SECStatus SignData(SECItem* result,
hash_type, &hash_data[0], input->data, input->len);
if (rv != SECSuccess)
return rv;
- SECItem hash = {siBuffer, &hash_data[0], hash_data.size()};
+ SECItem hash = {siBuffer, &hash_data[0],
+ static_cast<unsigned int>(hash_data.size())};
// Compute signature of hash.
int signature_len = PK11_SignatureLen(key);
std::vector<uint8> signature_data(signature_len);
- SECItem sig = {siBuffer, &signature_data[0], signature_len};
+ SECItem sig = {siBuffer, &signature_data[0],
+ static_cast<unsigned int>(signature_len)};
rv = PK11_Sign(key, &sig, &hash);
if (rv != SECSuccess)
return rv;

Powered by Google App Engine
This is Rietveld 408576698