summaryrefslogtreecommitdiff
path: root/util/cbfstool/fs.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-05-08 19:39:15 +0000
committerMyles Watson <mylesgw@gmail.com>2009-05-08 19:39:15 +0000
commit475aeda9d6d62d0249276bff657adc67d206ff31 (patch)
tree6b3d9371ce61197417ed308faca8cc36691ac58e /util/cbfstool/fs.c
parent83b8f0c48550bb1b2cb1a6610b1f0010bf8533a4 (diff)
Add -Werror to help us keep the code clean.
Change sizes from unsigned int to int. Clean up some usage and parameter checking. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4262 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool/fs.c')
-rw-r--r--util/cbfstool/fs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/cbfstool/fs.c b/util/cbfstool/fs.c
index 8292163961..d724ddae99 100644
--- a/util/cbfstool/fs.c
+++ b/util/cbfstool/fs.c
@@ -152,7 +152,7 @@ struct cbfs_file * rom_alloc(struct rom *rom, unsigned long size)
return ((struct cbfs_file *)ROM_PTR(rom, ret));
}
-struct cbfs_file *rom_find(struct rom *rom, unsigned int offset)
+struct cbfs_file *rom_find(struct rom *rom, int offset)
{
while (offset < rom->fssize) {
struct cbfs_file *c =
@@ -195,7 +195,7 @@ struct cbfs_file *rom_find_by_name(struct rom *rom, const char *name)
return NULL;
}
-unsigned int rom_used_space(struct rom *rom)
+int rom_used_space(struct rom *rom)
{
struct cbfs_file *c = rom_find_first(rom);
unsigned int ret = 0;
@@ -235,7 +235,7 @@ int rom_remove(struct rom *rom, const char *name)
return 0;
}
-int rom_extract(struct rom *rom, const char *name, void** buf, unsigned long *size )
+int rom_extract(struct rom *rom, const char *name, void** buf, int *size )
{
struct cbfs_file *c = rom_find_by_name(rom, name);
unsigned int csize;
@@ -265,8 +265,8 @@ int rom_extract(struct rom *rom, const char *name, void** buf, unsigned long *si
int rom_add(struct rom *rom, const char *name, void *buffer, int size, int type)
{
struct cbfs_file *c = rom_alloc(rom, size);
- unsigned int offset;
- unsigned int csize;
+ int offset;
+ int csize;
if (rom_find_by_name(rom, name)) {
ERROR("Component %s already exists in this rom\n", name);