Fixed some printf format

Silenced warnings
This commit is contained in:
Sergi Granell
2014-05-16 18:24:09 +02:00
parent 1358568517
commit 75c6af6d0e
12 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -147,17 +147,17 @@ int base64_decode( unsigned char *dst, size_t *dlen,
continue;
if( src[i] == '=' && ++j > 2 ){
printf("err 0 char[%d] = '%c' (0x%x)\n",i,src[i],src[i]);
printf("err 0 char[%lu] = '%c' (0x%x)\n",i,src[i],src[i]);
return( POLARSSL_ERR_BASE64_INVALID_CHARACTER );
}
if( src[i] > 127 || base64_dec_map[src[i]] == 127 ){
printf("err 1 char[%d] = '%c' (0x%x)\n",i,src[i],src[i]);
printf("err 1 char[%lu] = '%c' (0x%x)\n",i,src[i],src[i]);
return( POLARSSL_ERR_BASE64_INVALID_CHARACTER );
}
if( base64_dec_map[src[i]] < 64 && j != 0 ){
printf("err 2 char[%d] = '%c' (0x%x)\n",i,src[i],src[i]);
printf("err 2 char[%lu] = '%c' (0x%x)\n",i,src[i],src[i]);
return( POLARSSL_ERR_BASE64_INVALID_CHARACTER );
}
+1
View File
@@ -28,6 +28,7 @@
#define POLARSSL_BASE64_H
#include <string.h>
#include <stdio.h>
#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */
#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */
+1
View File
@@ -35,6 +35,7 @@
#include "polarssl/cipher_wrap.h"
#include <stdlib.h>
#include <strings.h>
#if defined _MSC_VER && !defined strcasecmp
#define strcasecmp _stricmp