summaryrefslogtreecommitdiff
path: root/tests/vboot_common3_tests.c
diff options
context:
space:
mode:
authorvbendeb <vbendeb@chromium.org>2010-06-24 16:19:53 -0700
committervbendeb <vbendeb@chromium.org>2010-06-24 16:19:53 -0700
commit3ecaf776d82d29573be083b2e5c6ddc5b9f49c70 (patch)
tree3887c0749d73e45562a250c275f56eb4f5356613 /tests/vboot_common3_tests.c
parentd6aad3a0888ad57383036dacdfc4c01f0c3b56e3 (diff)
downloadvboot-3ecaf776d82d29573be083b2e5c6ddc5b9f49c70.tar.gz
Make vboot_reference build in MSVC command line environment.
This is a mostly NOOP change which modifies the source code to compile cleanly in the MSVC command line build environment. A new makefile is introduced (msc/nmakefile) along with a README.txt in the same directory explaining how to build the code in the DOS window. As of this submission the build is running in a 32 bit environment, the intention is to use the same makefile for 64 bit builds in the future. Enabling high compilation warnings level allowed to identify a couple of bugs in the code which are being fixed. Not all sources are being compiled in the MSVC environment, only those in firmware/ and most of those in test/ subdirectories. The benchmark calculations require porting of the timer facilities and are being postponed. TEST Built in DOS and linux environments. Ran unit tests in linux environment. Review URL: http://codereview.chromium.org/2809037
Diffstat (limited to 'tests/vboot_common3_tests.c')
-rw-r--r--tests/vboot_common3_tests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/vboot_common3_tests.c b/tests/vboot_common3_tests.c
index e094d635..ff75906a 100644
--- a/tests/vboot_common3_tests.c
+++ b/tests/vboot_common3_tests.c
@@ -31,13 +31,13 @@ static void KeyBlockVerifyTest(const VbPublicKey* public_key,
VbKeyBlockHeader *hdr;
VbKeyBlockHeader *h;
- uint64_t hsize;
+ unsigned hsize;
hdr = KeyBlockCreate(data_key, private_key, 0x1234);
TEST_NEQ((size_t)hdr, 0, "KeyBlockVerify() prerequisites");
if (!hdr)
return;
- hsize = hdr->key_block_size;
+ hsize = (unsigned) hdr->key_block_size;
h = (VbKeyBlockHeader*)Malloc(hsize + 1024);
TEST_EQ(KeyBlockVerify(hdr, hsize, NULL), 0,
@@ -149,7 +149,7 @@ static void VerifyFirmwarePreambleTest(const VbPublicKey* public_key,
VbFirmwarePreambleHeader *hdr;
VbFirmwarePreambleHeader *h;
RSAPublicKey* rsa;
- uint64_t hsize;
+ unsigned hsize;
/* Create a dummy signature */
VbSignature *body_sig = SignatureAlloc(56, 78);
@@ -159,7 +159,7 @@ static void VerifyFirmwarePreambleTest(const VbPublicKey* public_key,
TEST_NEQ(hdr && rsa, 0, "VerifyFirmwarePreamble2() prerequisites");
if (!hdr)
return;
- hsize = hdr->preamble_size;
+ hsize = (unsigned) hdr->preamble_size;
h = (VbFirmwarePreambleHeader*)Malloc(hsize + 16384);
TEST_EQ(VerifyFirmwarePreamble2(hdr, hsize, rsa), 0,