From 134b28f883b0a24c625600b328f4c5750c849a24 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 6 Oct 2015 10:52:04 +0100 Subject: [PATCH] Fix windows compilation warnings Fix some warnings in the async code when compiling on windows. Reviewed-by: Rich Salz --- crypto/async/arch/async_null.c | 15 +++++++++++++++ crypto/async/arch/async_null.h | 3 --- crypto/async/arch/async_posix.h | 4 ---- crypto/async/async_locl.h | 3 +++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/crypto/async/arch/async_null.c b/crypto/async/arch/async_null.c index f4adda9788..05b4964eb2 100644 --- a/crypto/async/arch/async_null.c +++ b/crypto/async/arch/async_null.c @@ -91,5 +91,20 @@ int async_pool_can_grow(void) { return 0; } +int async_pipe(int *pipefds) +{ + return -1; +} + +int async_write1(int fd, const void *buf) +{ + return -1; +} + +int async_read1(int fd, void *buf) +{ + return -1; +} + #endif diff --git a/crypto/async/arch/async_null.h b/crypto/async/arch/async_null.h index 2dc4f2b42f..796a13dd15 100644 --- a/crypto/async/arch/async_null.h +++ b/crypto/async/arch/async_null.h @@ -73,8 +73,5 @@ typedef struct async_fibre_st { # define ASYNC_FIBRE_makecontext(c) # define ASYNC_FIBRE_free(f) # define ASYNC_FIBRE_init_dispatcher(f) -# define async_pipe(f) 0 -# define async_write1(f,b) ((*b == 0) ? (f = 0) : (f = 1)) -# define async_read1(f,b) (*b = 0) #endif diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h index 5b76428325..43cea6d9b0 100644 --- a/crypto/async/arch/async_posix.h +++ b/crypto/async/arch/async_posix.h @@ -99,9 +99,5 @@ static inline int ASYNC_FIBRE_swapcontext(ASYNC_FIBRE *o, ASYNC_FIBRE *n, int r) int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre); void ASYNC_FIBRE_free(ASYNC_FIBRE *fibre); -int async_pipe(int *pipefds); -int async_write1(int fd, const void *buf); -int async_read1(int fd, void *buf); - # endif #endif diff --git a/crypto/async/async_locl.h b/crypto/async/async_locl.h index ad85fa074e..154a79b51e 100644 --- a/crypto/async/async_locl.h +++ b/crypto/async/async_locl.h @@ -87,3 +87,6 @@ void async_release_job_to_pool(ASYNC_JOB *job); size_t async_pool_max_size(void); void async_release_pool(void); int async_pool_can_grow(void); +int async_pipe(int *pipefds); +int async_write1(int fd, const void *buf); +int async_read1(int fd, void *buf); -- 2.40.0