diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-04-30 14:12:23 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-05-07 16:56:21 -0700 |
commit | f03f8485e7d1a5258e16e0e376229f431d2c53ac (patch) | |
tree | 9c870b54b02952450035cf4e61f428c1780c1b38 | |
parent | 51d562d39976451a3a29992b00f36ea54e06c4af (diff) | |
download | system_core-f03f8485e7d1a5258e16e0e376229f431d2c53ac.zip system_core-f03f8485e7d1a5258e16e0e376229f431d2c53ac.tar.gz system_core-f03f8485e7d1a5258e16e0e376229f431d2c53ac.tar.bz2 |
libmincrypt: suppress warning messages
- deal with implict declaration issue
- deal with some -Wunused issues
Change-Id: I253f1412a696c4811ade70a931fb1c01b31c62a5
-rw-r--r-- | libmincrypt/dsa_sig.c | 1 | ||||
-rw-r--r-- | libmincrypt/test/ecdsa_test.c | 10 | ||||
-rw-r--r-- | libmincrypt/test/rsa_test.c | 12 |
3 files changed, 17 insertions, 6 deletions
diff --git a/libmincrypt/dsa_sig.c b/libmincrypt/dsa_sig.c index 8df6cf7..101314b 100644 --- a/libmincrypt/dsa_sig.c +++ b/libmincrypt/dsa_sig.c @@ -26,6 +26,7 @@ #include <string.h> +#include "mincrypt/dsa_sig.h" #include "mincrypt/p256.h" /** diff --git a/libmincrypt/test/ecdsa_test.c b/libmincrypt/test/ecdsa_test.c index b5a7b3a..24ec013 100644 --- a/libmincrypt/test/ecdsa_test.c +++ b/libmincrypt/test/ecdsa_test.c @@ -24,15 +24,21 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> #include <ctype.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/cdefs.h> +#include "mincrypt/dsa_sig.h" #include "mincrypt/p256.h" #include "mincrypt/p256_ecdsa.h" #include "mincrypt/sha256.h" +#ifndef __unused +#define __unused __attribute__((__unused__)) +#endif + /** * Messages signed using: * @@ -209,7 +215,7 @@ unsigned char* parsehex(char* str, int* len) { return result; } -int main(int arg, char** argv) { +int main(int arg __unused, char** argv __unused) { unsigned char hash_buf[SHA256_DIGEST_SIZE]; diff --git a/libmincrypt/test/rsa_test.c b/libmincrypt/test/rsa_test.c index 17862dc..055138f 100644 --- a/libmincrypt/test/rsa_test.c +++ b/libmincrypt/test/rsa_test.c @@ -1,5 +1,4 @@ -/* rsa_test.c -** +/* ** Copyright 2013, The Android Open Source Project ** ** Redistribution and use in source and binary forms, with or without @@ -25,14 +24,19 @@ ** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> #include <ctype.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/cdefs.h> #include "mincrypt/rsa.h" #include "mincrypt/sha.h" +#ifndef __unused +#define __unused __attribute__((unused)) +#endif + // RSA test data taken from: // // ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15sign-vectors.txt @@ -791,7 +795,7 @@ unsigned char* parsehex(char* str, int* len) { } -int main(int arg, char** argv) { +int main(int arg __unused, char** argv __unused) { unsigned char hash[SHA_DIGEST_SIZE]; |