mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 23:01:10 +00:00
Fix compiler warnings on iOS
This commit is contained in:
parent
7d75ea4787
commit
0b0b522932
|
@ -13,6 +13,7 @@ Bugfix
|
|||
* ssl_close_notify() could send more than one message in some circumstances
|
||||
with non-blocking I/O.
|
||||
* x509_crt_parse() did not increase total_failed on PEM error
|
||||
* Fix compiler warnings on iOS (found by Sander Niemeijer).
|
||||
|
||||
Changes
|
||||
* X.509 certificates with more than one AttributeTypeAndValue per
|
||||
|
|
|
@ -833,8 +833,8 @@
|
|||
|
||||
#define MULADDC_CORE \
|
||||
r = *(s++) * (t_udbl) b; \
|
||||
r0 = r; \
|
||||
r1 = r >> biL; \
|
||||
r0 = (t_uint) r; \
|
||||
r1 = (t_uint) r >> biL; \
|
||||
r0 += c; r1 += (r0 < c); \
|
||||
r0 += *d; r1 += (r0 < *d); \
|
||||
c = r1; *(d++) = r0;
|
||||
|
|
|
@ -325,7 +325,12 @@ void net_usleep( unsigned long usec )
|
|||
{
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 0;
|
||||
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || \
|
||||
(defined(__APPLE__) && defined(__MACH__)))
|
||||
tv.tv_usec = (suseconds_t) usec;
|
||||
#else
|
||||
tv.tv_usec = usec;
|
||||
#endif
|
||||
select( 0, NULL, NULL, NULL, &tv );
|
||||
}
|
||||
|
||||
|
@ -335,7 +340,7 @@ void net_usleep( unsigned long usec )
|
|||
int net_recv( void *ctx, unsigned char *buf, size_t len )
|
||||
{
|
||||
int fd = *((int *) ctx);
|
||||
int ret = read( fd, buf, len );
|
||||
int ret = (int) read( fd, buf, len );
|
||||
|
||||
if( ret < 0 )
|
||||
{
|
||||
|
@ -365,7 +370,7 @@ int net_recv( void *ctx, unsigned char *buf, size_t len )
|
|||
int net_send( void *ctx, const unsigned char *buf, size_t len )
|
||||
{
|
||||
int fd = *((int *) ctx);
|
||||
int ret = write( fd, buf, len );
|
||||
int ret = (int) write( fd, buf, len );
|
||||
|
||||
if( ret < 0 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue