More cleanup of MSVC errors

Review URL: http://codereview.chromium.org/2871019
This commit is contained in:
Randall Spangler
2010-06-21 18:25:31 -07:00
parent beb5bae09f
commit d0dae7a438
6 changed files with 8 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ export CFLAGS = -Wall -DNDEBUG -O3 -Werror -DCHROMEOS_ENVIRONMENT
export TOP = $(shell pwd) export TOP = $(shell pwd)
export FWDIR=$(TOP)/firmware export FWDIR=$(TOP)/firmware
export HOSTDIR=$(TOP)/host export HOSTDIR=$(TOP)/host
export INCLUDES = -I$(FWDIR)/include export INCLUDES = -I$(FWDIR)/include -I$(FWDIR)/stub/include
export BUILD = ${TOP}/build export BUILD = ${TOP}/build
export FWLIB = ${BUILD}/vboot_fw.a export FWLIB = ${BUILD}/vboot_fw.a

View File

@@ -12,7 +12,8 @@ INCLUDES = \
-I$(FWTOP)/include \ -I$(FWTOP)/include \
-I$(LIBDIR)/include \ -I$(LIBDIR)/include \
-I$(LIBDIR)/cgptlib/include \ -I$(LIBDIR)/cgptlib/include \
-I$(LIBDIR)/cryptolib/include -I$(LIBDIR)/cryptolib/include \
-I$(STUBDIR)/include
# find ./lib -iname '*.c' | sort # find ./lib -iname '*.c' | sort

View File

@@ -31,7 +31,7 @@
#define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby))) #define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby)))
#else #else
#include "stub/biosincludes.h" #include "biosincludes.h"
#endif #endif
#endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */ #endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */

View File

@@ -130,7 +130,7 @@ int CheckEntries(GptEntry* entries, GptHeader* h, uint64_t drive_sectors) {
/* Check all entries. */ /* Check all entries. */
for (i = 0, entry = entries; i < h->number_of_entries; i++, entry++) { for (i = 0, entry = entries; i < h->number_of_entries; i++, entry++) {
GptEntry* e2; GptEntry* e2;
int i2; uint32_t i2;
if (IsUnusedEntry(entry)) if (IsUnusedEntry(entry))
continue; continue;

View File

@@ -83,7 +83,7 @@ typedef struct {
uint32_t number_of_entries; uint32_t number_of_entries;
uint32_t size_of_entry; uint32_t size_of_entry;
uint32_t entries_crc32; 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; } __attribute__((packed)) GptHeader;
/* GPT partition entry defines the starting and ending LBAs of a partition. /* GPT partition entry defines the starting and ending LBAs of a partition.
@@ -104,7 +104,7 @@ typedef struct {
uint64_t whole; uint64_t whole;
} attrs; } attrs;
uint16_t name[36]; /* UTF-16 encoded partition name */ 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; } __attribute__((packed)) GptEntry;
#endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */

View File

@@ -170,7 +170,7 @@ int RSAVerify(const RSAPublicKey *key,
} }
/* Check if digest matches. */ /* Check if digest matches. */
for (; i < sig_len; ++i) { for (; i < (int)sig_len; ++i) {
if (buf[i] != *hash++) { if (buf[i] != *hash++) {
#ifndef NDEBUG #ifndef NDEBUG
/* TODO(gauravsh): Replace with a macro call for logging. */ /* TODO(gauravsh): Replace with a macro call for logging. */