diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-12-25 11:47:47 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-12-25 11:47:47 -0800 |
| commit | 024df6d86c7b0427d1c0a290c904696398499484 (patch) | |
| tree | faf6a62d56413b409286538444519e81fae748fa /src/platform/windows/win_impl.h | |
| parent | 788cd607ca4e595d839da67a27453d141d12bae8 (diff) | |
| download | nng-024df6d86c7b0427d1c0a290c904696398499484.tar.gz nng-024df6d86c7b0427d1c0a290c904696398499484.tar.bz2 nng-024df6d86c7b0427d1c0a290c904696398499484.zip | |
fixes #1552 Several warnings compiling in Windows with Visual Studio 2019
Note that one of these warning is a real bug that would prevent
TLS from functioning properly on Windows.
Diffstat (limited to 'src/platform/windows/win_impl.h')
| -rw-r--r-- | src/platform/windows/win_impl.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/platform/windows/win_impl.h b/src/platform/windows/win_impl.h index c5be56fa..7842bdb4 100644 --- a/src/platform/windows/win_impl.h +++ b/src/platform/windows/win_impl.h @@ -30,7 +30,7 @@ struct nni_plat_thr { void (*func)(void *); - void * arg; + void *arg; HANDLE handle; DWORD id; }; @@ -39,21 +39,30 @@ struct nni_plat_mtx { SRWLOCK srl; }; -#define NNI_MTX_INITIALIZER { SRWLOCK_INIT } +#define NNI_MTX_INITIALIZER \ + { \ + SRWLOCK_INIT \ + } struct nni_rwlock { SRWLOCK rwl; BOOLEAN exclusive; }; -#define NNI_RWLOCK_INITIALIZER { SRWLOCK_INIT } +#define NNI_RWLOCK_INITIALIZER \ + { \ + SRWLOCK_INIT \ + } struct nni_plat_cv { CONDITION_VARIABLE cv; PSRWLOCK srl; }; -#define NNI_CV_INITIALIZER(mxp) { .srl = mxp, .cv = CONDITION_VARIABLE_INIT } +#define NNI_CV_INITIALIZER(mxp) \ + { \ + .srl = (void *) mxp, .cv = CONDITION_VARIABLE_INIT \ + } struct nni_atomic_flag { LONG f; @@ -85,8 +94,8 @@ typedef void (*nni_win_io_cb)(nni_win_io *, int, size_t); struct nni_win_io { OVERLAPPED olpd; HANDLE f; - void * ptr; - nni_aio * aio; + void *ptr; + nni_aio *aio; nni_win_io_cb cb; }; |
