diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-04-30 13:25:49 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-05-05 10:30:04 -0700 |
commit | 1c00d46b2566e91be9268812dbb5d3abfea3c3a2 (patch) | |
tree | 3d8830477bbbabf1c75d609143ccca140f5c6539 /gpttool | |
parent | 02a7c3a7c3462250e853460190f3bd330105971b (diff) | |
download | system_core-1c00d46b2566e91be9268812dbb5d3abfea3c3a2.tar.gz system_core-1c00d46b2566e91be9268812dbb5d3abfea3c3a2.tar.bz2 system_core-1c00d46b2566e91be9268812dbb5d3abfea3c3a2.zip |
gpttool: turn on -Werror
- Deal with some -Wunused issues
Change-Id: If9a05ccbda862bbd401df0f5d5a1837abedd9b83
Diffstat (limited to 'gpttool')
-rw-r--r-- | gpttool/Android.mk | 1 | ||||
-rw-r--r-- | gpttool/gpttool.c | 15 |
2 files changed, 7 insertions, 9 deletions
diff --git a/gpttool/Android.mk b/gpttool/Android.mk index b8f9844c7..64ad945e9 100644 --- a/gpttool/Android.mk +++ b/gpttool/Android.mk @@ -5,6 +5,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := gpttool.c LOCAL_STATIC_LIBRARIES := libz +LOCAL_CFLAGS := -Werror LOCAL_MODULE := gpttool diff --git a/gpttool/gpttool.c b/gpttool/gpttool.c index d3f08fe14..398362f36 100644 --- a/gpttool/gpttool.c +++ b/gpttool/gpttool.c @@ -1,5 +1,4 @@ -/* system/core/gpttool/gpttool.c -** +/* ** Copyright 2011, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,18 +14,18 @@ ** limitations under the License. */ +#include <fcntl.h> #include <stdio.h> #include <stdlib.h> -#include <unistd.h> #include <string.h> -#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <unistd.h> #include <zlib.h> #include <linux/fs.h> -#include <sys/stat.h> - typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; @@ -252,11 +251,9 @@ int parse_ptn(struct ptable *ptbl, char *x) int main(int argc, char **argv) { struct ptable ptbl; - struct efi_entry *entry; struct efi_header *hdr = &ptbl.header; - struct stat s; u32 n; - u64 sz, blk; + u64 sz; int fd; const char *device; int real_disk = 0; |