Skip to content

Commit 873240e

Browse files
committed
Merge pull request #350 from libtom/fix/no-file-warnings
Fix warnings in `XMAC_file()` functions when compiling with `LTC_NO_FILE`. (cherry picked from commit 11cda2e)
1 parent e08fd86 commit 873240e

8 files changed

Lines changed: 45 additions & 0 deletions

File tree

src/mac/blake2/blake2bmac_file.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
int blake2bmac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
2424
{
2525
#ifdef LTC_NO_FILE
26+
LTC_UNUSED_PARAM(fname);
27+
LTC_UNUSED_PARAM(key);
28+
LTC_UNUSED_PARAM(keylen);
29+
LTC_UNUSED_PARAM(mac);
30+
LTC_UNUSED_PARAM(maclen);
2631
return CRYPT_NOP;
2732
#else
2833
blake2bmac_state st;

src/mac/blake2/blake2smac_file.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
int blake2smac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
2424
{
2525
#ifdef LTC_NO_FILE
26+
LTC_UNUSED_PARAM(fname);
27+
LTC_UNUSED_PARAM(key);
28+
LTC_UNUSED_PARAM(keylen);
29+
LTC_UNUSED_PARAM(mac);
30+
LTC_UNUSED_PARAM(maclen);
2631
return CRYPT_NOP;
2732
#else
2833
blake2smac_state st;

src/mac/f9/f9_file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ int f9_file(int cipher,
3131
unsigned char *out, unsigned long *outlen)
3232
{
3333
#ifdef LTC_NO_FILE
34+
LTC_UNUSED_PARAM(cipher);
35+
LTC_UNUSED_PARAM(key);
36+
LTC_UNUSED_PARAM(keylen);
37+
LTC_UNUSED_PARAM(fname);
38+
LTC_UNUSED_PARAM(out);
39+
LTC_UNUSED_PARAM(outlen);
3440
return CRYPT_NOP;
3541
#else
3642
size_t x;

src/mac/hmac/hmac_file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ int hmac_file(int hash, const char *fname,
3030
unsigned char *out, unsigned long *outlen)
3131
{
3232
#ifdef LTC_NO_FILE
33+
LTC_UNUSED_PARAM(hash);
34+
LTC_UNUSED_PARAM(fname);
35+
LTC_UNUSED_PARAM(key);
36+
LTC_UNUSED_PARAM(keylen);
37+
LTC_UNUSED_PARAM(out);
38+
LTC_UNUSED_PARAM(outlen);
3339
return CRYPT_NOP;
3440
#else
3541
hmac_state hmac;

src/mac/omac/omac_file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ int omac_file(int cipher,
3131
unsigned char *out, unsigned long *outlen)
3232
{
3333
#ifdef LTC_NO_FILE
34+
LTC_UNUSED_PARAM(cipher);
35+
LTC_UNUSED_PARAM(key);
36+
LTC_UNUSED_PARAM(keylen);
37+
LTC_UNUSED_PARAM(filename);
38+
LTC_UNUSED_PARAM(out);
39+
LTC_UNUSED_PARAM(outlen);
3440
return CRYPT_NOP;
3541
#else
3642
size_t x;

src/mac/pmac/pmac_file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ int pmac_file(int cipher,
3131
unsigned char *out, unsigned long *outlen)
3232
{
3333
#ifdef LTC_NO_FILE
34+
LTC_UNUSED_PARAM(cipher);
35+
LTC_UNUSED_PARAM(key);
36+
LTC_UNUSED_PARAM(keylen);
37+
LTC_UNUSED_PARAM(filename);
38+
LTC_UNUSED_PARAM(out);
39+
LTC_UNUSED_PARAM(outlen);
3440
return CRYPT_NOP;
3541
#else
3642
size_t x;

src/mac/poly1305/poly1305_file.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
int poly1305_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
2929
{
3030
#ifdef LTC_NO_FILE
31+
LTC_UNUSED_PARAM(fname);
32+
LTC_UNUSED_PARAM(key);
33+
LTC_UNUSED_PARAM(keylen);
34+
LTC_UNUSED_PARAM(mac);
35+
LTC_UNUSED_PARAM(maclen);
3136
return CRYPT_NOP;
3237
#else
3338
poly1305_state st;

src/mac/xcbc/xcbc_file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ int xcbc_file(int cipher,
3131
unsigned char *out, unsigned long *outlen)
3232
{
3333
#ifdef LTC_NO_FILE
34+
LTC_UNUSED_PARAM(cipher);
35+
LTC_UNUSED_PARAM(key);
36+
LTC_UNUSED_PARAM(keylen);
37+
LTC_UNUSED_PARAM(filename);
38+
LTC_UNUSED_PARAM(out);
39+
LTC_UNUSED_PARAM(outlen);
3440
return CRYPT_NOP;
3541
#else
3642
size_t x;

0 commit comments

Comments
 (0)