Commit bdc383a9 authored by Ghislain MARY's avatar Ghislain MARY

Fix build warnings with Visual Studio.

parent 55849572
......@@ -52,7 +52,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define write _write
#define close _close
#define lseek _lseek
#define fstat _fstat
#endif /*!_WIN32*/
......@@ -81,9 +80,6 @@ struct bctbx_vfs_file_t {
* them useful*/
void* pUserData; /*Developpers can store private data under this pointer */
int fd; /* File descriptor */
#if _WIN32
HANDLE h;
#endif
off_t offset; /*File offset used by lseek*/
};
......
......@@ -669,7 +669,7 @@ BCTBX_PUBLIC int32_t bctbx_aes_gcm_decrypt_and_auth(const uint8_t *key, size_t k
BCTBX_PUBLIC bctbx_aes_gcm_context_t *bctbx_aes_gcm_context_new(const uint8_t *key, size_t keyLength,
const uint8_t *authenticatedData, size_t authenticatedDataLength,
const uint8_t *initializationVector, size_t initializationVectorLength,
const uint8_t mode);
uint8_t mode);
/**
* @Brief AES-GCM encrypt or decrypt a chunk of data
......
......@@ -199,7 +199,7 @@ static int bcGetLine(bctbx_vfs_file_t *pFile, char *s, int max_len) {
pFile->offset += sizeofline;
} else {
/*did not find end of line char, is EOF?*/
sizeofline = ret;
sizeofline = (int)ret;
pFile->offset += sizeofline;
s[ret] = '\0';
}
......@@ -250,9 +250,6 @@ static int bcOpen(bctbx_vfs_t *pVfs, bctbx_vfs_file_t *pFile, const char *fName,
if (pFile->fd == -1) {
return -errno;
}
#if _WIN32
pFile->h = _get_osfhandle(pFile->fd);
#endif
pFile->pMethods = &bcio;
return BCTBX_VFS_OK;
......
......@@ -453,7 +453,7 @@ int32_t bctbx_x509_certificate_get_fingerprint(const bctbx_x509_certificate_t *c
}
if (hash_length>0) {
int i;
size_t i;
int fingerprint_index = strlen(hash_alg_string);
char prefix=' ';
......@@ -1234,7 +1234,7 @@ int32_t bctbx_ssl_config_set_own_cert(bctbx_ssl_config_t *ssl_config, bctbx_x509
/** DTLS SRTP functions **/
#ifdef HAVE_DTLS_SRTP
int32_t bctbx_ssl_config_set_dtls_srtp_protection_profiles(bctbx_ssl_config_t *ssl_config, const bctbx_dtls_srtp_profile_t *profiles, size_t profiles_number) {
int i;
size_t i;
enum mbedtls_DTLS_SRTP_protection_profiles dtls_srtp_mbedtls_profiles[4];
if (ssl_config == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment