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

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: Wrap unisdt.h using OS_POSIX macro Created 8 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
« no previous file with comments | « crypto/ec_private_key_nss.cc ('k') | crypto/third_party/nss/secsign.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a85b1e94fecf20299494fcffdc95c7894fb375da 100644
--- a/crypto/ec_signature_creator_nss.cc
+++ b/crypto/ec_signature_creator_nss.cc
@@ -8,6 +8,9 @@
#include <pk11pub.h>
#include <secerr.h>
#include <sechash.h>
+#if defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include "base/logging.h"
#include "crypto/ec_private_key.h"
@@ -34,12 +37,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;
« no previous file with comments | « crypto/ec_private_key_nss.cc ('k') | crypto/third_party/nss/secsign.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698