diff options
author | Sam Gross <sgross@fb.com> | 2016-10-26 22:43:46 +0300 |
---|---|---|
committer | Sam Gross <sgross@fb.com> | 2016-10-26 22:44:34 +0300 |
commit | 2b2133a7d7246cbaea4c88048c8da27536830a72 (patch) | |
tree | 991686996e774ac6b8549d6b142b791aaea73744 | |
parent | 64f974178c03c93666cfe3796b7e2d7b549476a2 (diff) |
Use 'void' for no-arg functions
-rw-r--r-- | lib/THC/THCCachingAllocator.cpp | 2 | ||||
-rw-r--r-- | lib/THC/THCCachingAllocator.h | 2 | ||||
-rw-r--r-- | lib/THC/THCGeneral.c | 2 | ||||
-rw-r--r-- | lib/THC/THCGeneral.h.in | 2 | ||||
-rw-r--r-- | lib/THC/THCThreadLocal.c | 2 | ||||
-rw-r--r-- | lib/THC/THCThreadLocal.h | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/lib/THC/THCCachingAllocator.cpp b/lib/THC/THCCachingAllocator.cpp index 54db20d..294b99d 100644 --- a/lib/THC/THCCachingAllocator.cpp +++ b/lib/THC/THCCachingAllocator.cpp @@ -306,7 +306,7 @@ static THCDeviceAllocator device_allocator = { &caching_allocator }; -THC_API THCDeviceAllocator* THCCachingAllocator_get() +THC_API THCDeviceAllocator* THCCachingAllocator_get(void) { return &device_allocator; } diff --git a/lib/THC/THCCachingAllocator.h b/lib/THC/THCCachingAllocator.h index 711b1da..5d80bd5 100644 --- a/lib/THC/THCCachingAllocator.h +++ b/lib/THC/THCCachingAllocator.h @@ -3,6 +3,6 @@ #include "THCGeneral.h" -THC_API THCDeviceAllocator* THCCachingAllocator_get(); +THC_API THCDeviceAllocator* THCCachingAllocator_get(void); #endif diff --git a/lib/THC/THCGeneral.c b/lib/THC/THCGeneral.c index 0a1d340..5feb8ec 100644 --- a/lib/THC/THCGeneral.c +++ b/lib/THC/THCGeneral.c @@ -15,7 +15,7 @@ THCCudaResourcesPerDevice* THCState_getDeviceResourcePtr( THCState *state, int device); -THCState* THCState_alloc() +THCState* THCState_alloc(void) { THCState* state = (THCState*) malloc(sizeof(THCState)); memset(state, 0, sizeof(THCState)); diff --git a/lib/THC/THCGeneral.h.in b/lib/THC/THCGeneral.h.in index 22aab03..c50cc1c 100644 --- a/lib/THC/THCGeneral.h.in +++ b/lib/THC/THCGeneral.h.in @@ -108,7 +108,7 @@ struct THCState { ptrdiff_t heapDelta; }; -THC_API THCState* THCState_alloc(); +THC_API THCState* THCState_alloc(void); THC_API void THCState_free(THCState* state); THC_API void THCudaInit(THCState* state); diff --git a/lib/THC/THCThreadLocal.c b/lib/THC/THCThreadLocal.c index a46bf1e..26a4093 100644 --- a/lib/THC/THCThreadLocal.c +++ b/lib/THC/THCThreadLocal.c @@ -2,7 +2,7 @@ #include "THCGeneral.h" -THCThreadLocal THCThreadLocal_alloc() +THCThreadLocal THCThreadLocal_alloc(void) { #ifndef _WIN32 pthread_key_t key; diff --git a/lib/THC/THCThreadLocal.h b/lib/THC/THCThreadLocal.h index 22d970a..7843821 100644 --- a/lib/THC/THCThreadLocal.h +++ b/lib/THC/THCThreadLocal.h @@ -9,7 +9,7 @@ typedef DWORD THCThreadLocal; typedef pthread_key_t THCThreadLocal; #endif -THCThreadLocal THCThreadLocal_alloc(); +THCThreadLocal THCThreadLocal_alloc(void); void THCThreadLocal_free(THCThreadLocal local); void* THCThreadLocal_get(THCThreadLocal local); void THCThreadLocal_set(THCThreadLocal local, void* value); |