Fix windows compilation warnings
authorMatt Caswell <matt@openssl.org>
Tue, 6 Oct 2015 09:52:04 +0000 (10:52 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 20 Nov 2015 23:34:35 +0000 (23:34 +0000)
Fix some warnings in the async code when compiling on windows.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/async/arch/async_null.c
crypto/async/arch/async_null.h
crypto/async/arch/async_posix.h
crypto/async/async_locl.h

index f4adda978896449f7de5a8145ff41a068c4c17d1..05b4964eb2dc7da5d78d9481d55d36d1103af790 100644 (file)
@@ -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
 
index 2dc4f2b42fb4d08ea557b3e12e60cdf9f650d854..796a13dd15732a5f4aa787c2d1c94cc3f876d8d0 100644 (file)
@@ -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
index 5b764283255a32d987ce08a8fee556470b63bc43..43cea6d9b0b18ffed7492dde1d0e520066e39c53 100644 (file)
@@ -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
index ad85fa074e09d298894086e99e8e2f0564ab3875..154a79b51ed5de876a08d79f02803a9051358ef9 100644 (file)
@@ -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);