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 11cda2e274b415c6ab6a6a2f49fdbf9d7251897f)
This commit is contained in:
		
							parent
							
								
									e08fd8630f
								
							
						
					
					
						commit
						873240e7a0
					
				@ -23,6 +23,11 @@
 | 
				
			|||||||
int blake2bmac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
 | 
					int blake2bmac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(fname);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(mac);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(maclen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   blake2bmac_state st;
 | 
					   blake2bmac_state st;
 | 
				
			||||||
 | 
				
			|||||||
@ -23,6 +23,11 @@
 | 
				
			|||||||
int blake2smac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
 | 
					int blake2smac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(fname);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(mac);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(maclen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   blake2smac_state st;
 | 
					   blake2smac_state st;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,6 +31,12 @@ int f9_file(int cipher,
 | 
				
			|||||||
                    unsigned char *out, unsigned long *outlen)
 | 
					                    unsigned char *out, unsigned long *outlen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(cipher);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(fname);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(out);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(outlen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   size_t x;
 | 
					   size_t x;
 | 
				
			||||||
 | 
				
			|||||||
@ -30,6 +30,12 @@ int hmac_file(int hash, const char *fname,
 | 
				
			|||||||
                    unsigned char *out, unsigned long *outlen)
 | 
					                    unsigned char *out, unsigned long *outlen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(hash);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(fname);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(out);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(outlen);
 | 
				
			||||||
    return CRYPT_NOP;
 | 
					    return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   hmac_state hmac;
 | 
					   hmac_state hmac;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,6 +31,12 @@ int omac_file(int cipher,
 | 
				
			|||||||
                    unsigned char *out, unsigned long *outlen)
 | 
					                    unsigned char *out, unsigned long *outlen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(cipher);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(filename);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(out);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(outlen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   size_t x;
 | 
					   size_t x;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,6 +31,12 @@ int pmac_file(int cipher,
 | 
				
			|||||||
                    unsigned char *out, unsigned long *outlen)
 | 
					                    unsigned char *out, unsigned long *outlen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(cipher);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(filename);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(out);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(outlen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   size_t x;
 | 
					   size_t x;
 | 
				
			||||||
 | 
				
			|||||||
@ -28,6 +28,11 @@
 | 
				
			|||||||
int poly1305_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
 | 
					int poly1305_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(fname);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(mac);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(maclen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   poly1305_state st;
 | 
					   poly1305_state st;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,6 +31,12 @@ int xcbc_file(int cipher,
 | 
				
			|||||||
                    unsigned char *out, unsigned long *outlen)
 | 
					                    unsigned char *out, unsigned long *outlen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef LTC_NO_FILE
 | 
					#ifdef LTC_NO_FILE
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(cipher);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(key);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(keylen);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(filename);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(out);
 | 
				
			||||||
 | 
					   LTC_UNUSED_PARAM(outlen);
 | 
				
			||||||
   return CRYPT_NOP;
 | 
					   return CRYPT_NOP;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
   size_t x;
 | 
					   size_t x;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user