diff options
author | Doug Zongker <dougz@android.com> | 2014-02-18 17:48:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-18 17:48:19 +0000 |
commit | f2ff0a2097cd945a612fb461741b803d2b5aca7a (patch) | |
tree | 7bc57a86cbf178d77f4790f76fa2e59d69defa7a /updater | |
parent | 48f4c3d60c9679d2cb6cd2931c2bc1138f3777cb (diff) | |
parent | 0d32f259cddeaf46917bdc4af3514114c206dd76 (diff) | |
download | bootable_recovery-f2ff0a2097cd945a612fb461741b803d2b5aca7a.zip bootable_recovery-f2ff0a2097cd945a612fb461741b803d2b5aca7a.tar.gz bootable_recovery-f2ff0a2097cd945a612fb461741b803d2b5aca7a.tar.bz2 |
Merge "clean up some warnings when building recovery"
Diffstat (limited to 'updater')
-rw-r--r-- | updater/Android.mk | 1 | ||||
-rw-r--r-- | updater/install.c | 6 | ||||
-rw-r--r-- | updater/updater.c | 3 |
3 files changed, 5 insertions, 5 deletions
diff --git a/updater/Android.mk b/updater/Android.mk index ebcfef1..99b4890 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -20,6 +20,7 @@ LOCAL_SRC_FILES := $(updater_src_files) ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) LOCAL_CFLAGS += -DUSE_EXT4 +LOCAL_CFLAGS += -Wno-unused-parameter LOCAL_C_INCLUDES += system/extras/ext4_utils LOCAL_STATIC_LIBRARIES += \ libext4_utils_static \ diff --git a/updater/install.c b/updater/install.c index e85ba50..ccafad9 100644 --- a/updater/install.c +++ b/updater/install.c @@ -52,7 +52,7 @@ #endif // Take a sha-1 digest and return it as a newly-allocated hex string. -static char* PrintSha1(uint8_t* digest) { +static char* PrintSha1(const uint8_t* digest) { char* buffer = malloc(SHA_DIGEST_SIZE*2 + 1); int i; const char* alphabet = "0123456789abcdef"; @@ -1115,9 +1115,9 @@ Value* SysPatchFn(const char* name, State* state, int argc, Expr* argv[]) { pos += read; } rewind(src); - uint8_t* digest = SHA_final(&ctx); + const uint8_t* digest = SHA_final(&ctx); - char* hexdigest = PrintSha1(digest); + const char* hexdigest = PrintSha1(digest); printf(" system partition sha1 = %s\n", hexdigest); if (memcmp(digest, target_digest, SHA_DIGEST_SIZE) == 0) { diff --git a/updater/updater.c b/updater/updater.c index 4e1cc9c..b7af3e5 100644 --- a/updater/updater.c +++ b/updater/updater.c @@ -105,8 +105,7 @@ int main(int argc, char** argv) { Expr* root; int error_count = 0; - yy_scan_string(script); - int error = yyparse(&root, &error_count); + int error = parse_string(script, &root, &error_count); if (error != 0 || error_count > 0) { printf("%d parse errors\n", error_count); return 6; |