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

Unified Diff: tests/vboot_common_tests.c

Issue 2809037: Make vboot_reference build in MSVC command line environment. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Integrated trunk changes. 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
« no previous file with comments | « tests/vboot_common3_tests.c ('k') | utility/load_kernel_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/vboot_common_tests.c
diff --git a/tests/vboot_common_tests.c b/tests/vboot_common_tests.c
index e707daf13160050fddaaf28833402d2412c31045..d01b2f93aafa2d5b0432f228c9ba58a3aa7ee362 100644
--- a/tests/vboot_common_tests.c
+++ b/tests/vboot_common_tests.c
@@ -31,24 +31,24 @@ static void VerifyHelperFunctions(void) {
{
uint8_t p[1];
- TEST_EQ(OffsetOf(p, p), 0, "OffsetOf() equal");
- TEST_EQ(OffsetOf(p, p+10), 10, "OffsetOf() positive");
- TEST_EQ(OffsetOf(p, p+0x12345678), 0x12345678, "OffsetOf() large");
+ TEST_EQ((int)OffsetOf(p, p), 0, "OffsetOf() equal");
+ TEST_EQ((int)OffsetOf(p, p+10), 10, "OffsetOf() positive");
+ TEST_EQ((int)OffsetOf(p, p+0x12345678), 0x12345678, "OffsetOf() large");
}
{
VbPublicKey k = {sizeof(k), 2, 3, 4};
- TEST_EQ(OffsetOf(&k, GetPublicKeyData(&k)), sizeof(k),
+ TEST_EQ((int)OffsetOf(&k, GetPublicKeyData(&k)), sizeof(k),
"GetPublicKeyData() adjacent");
- TEST_EQ(OffsetOf(&k, GetPublicKeyDataC(&k)), sizeof(k),
+ TEST_EQ((int)OffsetOf(&k, GetPublicKeyDataC(&k)), sizeof(k),
"GetPublicKeyDataC() adjacent");
}
{
VbPublicKey k = {123, 2, 3, 4};
- TEST_EQ(OffsetOf(&k, GetPublicKeyData(&k)), 123,
+ TEST_EQ((int)OffsetOf(&k, GetPublicKeyData(&k)), 123,
"GetPublicKeyData() spaced");
- TEST_EQ(OffsetOf(&k, GetPublicKeyDataC(&k)), 123,
+ TEST_EQ((int)OffsetOf(&k, GetPublicKeyDataC(&k)), 123,
"GetPublicKeyDataC() spaced");
}
@@ -64,7 +64,7 @@ static void VerifyHelperFunctions(void) {
"MemberInside member too big");
TEST_EQ(VerifyMemberInside(p, 20, p, 4, 21, 0), 1,
"MemberInside data after parent");
- TEST_EQ(VerifyMemberInside(p, 20, p, 4, -1, 0), 1,
+ TEST_EQ(VerifyMemberInside(p, 20, p, 4, (uint64_t)-1, 0), 1,
"MemberInside data before parent");
TEST_EQ(VerifyMemberInside(p, 20, p, 4, 4, 17), 1,
"MemberInside data too big");
@@ -101,6 +101,8 @@ static void VerifyHelperFunctions(void) {
}
+/* disable MSVC warnings on unused arguments */
+__pragma(warning (disable: 4100))
int main(int argc, char* argv[]) {
int error_code = 0;
« no previous file with comments | « tests/vboot_common3_tests.c ('k') | utility/load_kernel_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698