Remove wornings

This commit is contained in:
Takashi Kojo 2015-06-23 17:39:15 +09:00
parent d334b05596
commit c6e2591711
5 changed files with 24 additions and 10 deletions

View File

@ -250,6 +250,7 @@ static int AesAuthArgCheck(Aes* aes, byte* out, const byte* in, word32 inSz,
const byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz, word32 *M, word32 *L)
{
(void) authInSz ;
if((aes == NULL)||(nonce == NULL)||(authTag== NULL)||(authIn == NULL))
return BAD_FUNC_ARG;
if((inSz != 0) && ((out == NULL)||(in == NULL)))

View File

@ -27,7 +27,7 @@
#if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH)
#include "wolfssl/wolfcrypt/port/ti/ti-ccm.h"
#include <stdbool.h>
#include <stdint.h>
@ -44,7 +44,7 @@
#define WAIT(stat) { volatile int i ; for(i=0; i<TIMEOUT; i++)if(stat)break ; if(i==TIMEOUT)return(false) ; }
static bool ccm_init = false ;
bool wolfSSL_TI_CCMInit(void)
int wolfSSL_TI_CCMInit(void)
{
if(ccm_init)return true ;
ccm_init = true ;
@ -70,11 +70,11 @@ bool wolfSSL_TI_CCMInit(void)
}
#ifndef SINGLE_THREADED
void wolfSSL_TI_lockCCM() {
void wolfSSL_TI_lockCCM(void) {
LockMutex(&TI_CCM_Mutex) ;
}
void wolfSSL_TI_unlockCCM() {
void wolfSSL_TI_unlockCCM(void) {
UnLockMutex(&TI_CCM_Mutex) ;
}
#endif

View File

@ -159,7 +159,10 @@ WOLFSSL_API int wc_Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 s
WOLFSSL_API int wc_Des_CbcDecryptWithKey(byte* out, const byte* in, word32 sz,
const byte* key, const byte* iv)
{ return 0 ;}
{
(void)out; (void)in; (void)sz; (void)key; (void)iv ;
return 0 ;
}
WOLFSSL_API int wc_Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz)
{
@ -173,7 +176,10 @@ WOLFSSL_API int wc_Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32
WOLFSSL_API int wc_Des3_CbcDecryptWithKey(byte* out, const byte* in, word32 sz,
const byte* key, const byte* iv)
{ return 0 ; }
{
(void)out; (void)in; (void)sz; (void)key; (void)iv ;
return 0 ;
}
#endif /* WOLFSSL_TI_CRYPT */

View File

@ -44,6 +44,7 @@
#include <wolfssl/wolfcrypt/port/ti/ti-hash.h>
#include <wolfssl/wolfcrypt/port/ti/ti-ccm.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/hash.h>
#ifndef TI_DUMMY_BUILD
#include "inc/hw_memmap.h"
@ -61,7 +62,7 @@ bool wolfSSL_TI_CCMInit(void) { return true ; }
#endif
static int hashInit(wolfssl_TI_Hash *hash) {
if(!wolfSSL_TI_CCMInit())return ;
if(!wolfSSL_TI_CCMInit())return 1 ;
hash->used = 0 ;
hash->msg = 0 ;
hash->len = 0 ;

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef WOLF_CRYPT_TI_CCM_H
#define WOLF_CRYPT_TI_CCM_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -27,14 +30,17 @@
#if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH)
bool wolfSSL_TI_CCMInit(void) ;
int wolfSSL_TI_CCMInit(void) ;
#ifndef SINGLE_THREADED
void wolfSSL_TI_lockCCM() ;
void wolfSSL_TI_unlockCCM() ;
void wolfSSL_TI_lockCCM(void) ;
void wolfSSL_TI_unlockCCM(void) ;
#else
#define wolfSSL_TI_lockCCM()
#define wolfSSL_TI_unlockCCM()
#endif
#endif
#endif