diff options
author | Randall Spangler <rspangler@chromium.org> | 2010-06-21 18:25:31 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2010-06-21 18:25:31 -0700 |
commit | d0dae7a4388139161c56e5b3c37a6e079f9558fd (patch) | |
tree | 049f8ac206b49b880486835354554670ccd1e6e8 | |
parent | beb5bae09f7c7153a1a89946026ba2af8cf3c838 (diff) | |
download | vboot-d0dae7a4388139161c56e5b3c37a6e079f9558fd.tar.gz |
More cleanup of MSVC errors
Review URL: http://codereview.chromium.org/2871019
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | firmware/Makefile | 3 | ||||
-rw-r--r-- | firmware/include/sysincludes.h | 2 | ||||
-rw-r--r-- | firmware/lib/cgptlib/cgptlib_internal.c | 2 | ||||
-rw-r--r-- | firmware/lib/cgptlib/include/gpt.h | 4 | ||||
-rw-r--r-- | firmware/lib/cryptolib/rsa.c | 2 |
6 files changed, 8 insertions, 7 deletions
@@ -8,7 +8,7 @@ export CFLAGS = -Wall -DNDEBUG -O3 -Werror -DCHROMEOS_ENVIRONMENT export TOP = $(shell pwd) export FWDIR=$(TOP)/firmware export HOSTDIR=$(TOP)/host -export INCLUDES = -I$(FWDIR)/include +export INCLUDES = -I$(FWDIR)/include -I$(FWDIR)/stub/include export BUILD = ${TOP}/build export FWLIB = ${BUILD}/vboot_fw.a diff --git a/firmware/Makefile b/firmware/Makefile index 07e113a0..2dc80480 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -12,7 +12,8 @@ INCLUDES = \ -I$(FWTOP)/include \ -I$(LIBDIR)/include \ -I$(LIBDIR)/cgptlib/include \ - -I$(LIBDIR)/cryptolib/include + -I$(LIBDIR)/cryptolib/include \ + -I$(STUBDIR)/include # find ./lib -iname '*.c' | sort diff --git a/firmware/include/sysincludes.h b/firmware/include/sysincludes.h index b98cae09..be7e701d 100644 --- a/firmware/include/sysincludes.h +++ b/firmware/include/sysincludes.h @@ -31,7 +31,7 @@ #define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby))) #else -#include "stub/biosincludes.h" +#include "biosincludes.h" #endif #endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */ diff --git a/firmware/lib/cgptlib/cgptlib_internal.c b/firmware/lib/cgptlib/cgptlib_internal.c index a436d8f3..4e0a06ac 100644 --- a/firmware/lib/cgptlib/cgptlib_internal.c +++ b/firmware/lib/cgptlib/cgptlib_internal.c @@ -130,7 +130,7 @@ int CheckEntries(GptEntry* entries, GptHeader* h, uint64_t drive_sectors) { /* Check all entries. */ for (i = 0, entry = entries; i < h->number_of_entries; i++, entry++) { GptEntry* e2; - int i2; + uint32_t i2; if (IsUnusedEntry(entry)) continue; diff --git a/firmware/lib/cgptlib/include/gpt.h b/firmware/lib/cgptlib/include/gpt.h index 1e8f47ff..cd5e12b9 100644 --- a/firmware/lib/cgptlib/include/gpt.h +++ b/firmware/lib/cgptlib/include/gpt.h @@ -83,7 +83,7 @@ typedef struct { uint32_t number_of_entries; uint32_t size_of_entry; uint32_t entries_crc32; - uint8_t reserved_padding[]; /* entire sector reserved for header */ + /* Remainder of sector is reserved and should be 0 */ } __attribute__((packed)) GptHeader; /* GPT partition entry defines the starting and ending LBAs of a partition. @@ -104,7 +104,7 @@ typedef struct { uint64_t whole; } attrs; uint16_t name[36]; /* UTF-16 encoded partition name */ - uint8_t reserved[]; /* nothing, really */ + /* Remainder of entry is reserved and should be 0 */ } __attribute__((packed)) GptEntry; #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ diff --git a/firmware/lib/cryptolib/rsa.c b/firmware/lib/cryptolib/rsa.c index 930d91b4..2aef52cf 100644 --- a/firmware/lib/cryptolib/rsa.c +++ b/firmware/lib/cryptolib/rsa.c @@ -170,7 +170,7 @@ int RSAVerify(const RSAPublicKey *key, } /* Check if digest matches. */ - for (; i < sig_len; ++i) { + for (; i < (int)sig_len; ++i) { if (buf[i] != *hash++) { #ifndef NDEBUG /* TODO(gauravsh): Replace with a macro call for logging. */ |