Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f03f8485 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

libmincrypt: suppress warning messages

- deal with implict declaration issue
- deal with some -Wunused issues

Change-Id: I253f1412a696c4811ade70a931fb1c01b31c62a5
parent 51d562d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#include <string.h>

#include "mincrypt/dsa_sig.h"
#include "mincrypt/p256.h"

/**
+8 −2
Original line number Diff line number Diff line
@@ -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];

+8 −4
Original line number Diff line number Diff line
/* 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];