From b11d7fb4a7ca3eb74db9712db47b8b0c2cd49914 Mon Sep 17 00:00:00 2001 From: Rusty Sears Date: Tue, 4 Dec 2012 18:17:23 -0800 Subject: [PATCH] change declartions of fcn() to fcn(void) --- benchmarks/berkeleyDB/bdbHash.c | 4 +- benchmarks/berkeleyDB/bdbRaw.c | 4 +- benchmarks/berkeleyDB/genericBerkeleyDBCode.c | 4 +- benchmarks/berkeleyDB/transapp.c | 4 +- benchmarks/lsn_bench_common.h | 4 +- benchmarks/seekMap.c | 2 +- src/apps/referential/algebra.c | 2 +- src/apps/referential/tuple.c | 2 +- src/pobj/debug.c | 2 +- src/stasis/allocationPolicy.c | 2 +- .../legacy/legacyBufferManager.c | 4 +- src/stasis/bufferManager/legacy/pageCache.c | 4 +- src/stasis/bufferManager/pageArray.c | 2 +- src/stasis/bufferPool.c | 2 +- src/stasis/dirtyPageTable.c | 2 +- src/stasis/experimental/arrayCollection.c | 2 +- src/stasis/experimental/consumer.c | 2 +- src/stasis/experimental/fifo.c | 2 +- src/stasis/experimental/group.c | 2 +- src/stasis/experimental/lockManagerImpl.c | 6 +- src/stasis/experimental/logMemory.c | 2 +- src/stasis/experimental/lsmTree.c | 2 +- src/stasis/io/handle.c | 2 +- src/stasis/io/memory.c | 2 +- src/stasis/io/raid0.c | 2 +- src/stasis/io/raid1.c | 2 +- src/stasis/iterator.c | 2 +- src/stasis/lockManager.c | 2 +- src/stasis/logger/inMemoryLog.c | 2 +- src/stasis/operations.c | 2 +- src/stasis/operations/alloc.c | 6 +- src/stasis/operations/arrayList.c | 2 +- src/stasis/operations/bTree.c | 4 +- src/stasis/operations/blobs.c | 2 +- src/stasis/operations/decrement.c | 2 +- src/stasis/operations/increment.c | 2 +- src/stasis/operations/linearHashNTA.c | 8 +-- src/stasis/operations/linkedListNTA.c | 8 +-- src/stasis/operations/lsnFreeSet.c | 4 +- src/stasis/operations/naiveLinearHash.c | 4 +- src/stasis/operations/noop.c | 2 +- src/stasis/operations/pageOperations.c | 8 +-- src/stasis/operations/prepare.c | 4 +- src/stasis/operations/regions.c | 10 ++-- src/stasis/operations/segmentFile.c | 4 +- src/stasis/operations/set.c | 8 +-- src/stasis/page.c | 2 +- src/stasis/page/fixed.c | 8 +-- src/stasis/page/lsnFree.c | 2 +- src/stasis/page/segment.c | 2 +- src/stasis/page/slotted.c | 8 +-- src/stasis/page/uninitialized.c | 2 +- src/stasis/replacementPolicy/lru.c | 2 +- src/stasis/replacementPolicy/lruFast.c | 2 +- src/stasis/transactionTable.c | 2 +- src/stasis/transactional2.c | 26 ++++----- src/stasis/util/lhtable.c | 2 +- src/stasis/util/multiset.c | 2 +- src/stasis/util/redblack.c | 5 +- src/timing/getTimeOfDay.c | 2 +- stasis/experimental/compression/compression.h | 2 +- stasis/experimental/compression/for.h | 16 ++--- .../compression/multicolumn-impl.h | 8 +-- stasis/experimental/compression/multicolumn.h | 8 +-- stasis/experimental/compression/nop.h | 8 +-- stasis/experimental/compression/pageLayout.h | 16 ++--- .../compression/pluginDispatcher.h | 2 +- stasis/experimental/compression/pstar-impl.h | 2 +- stasis/experimental/compression/pstar.h | 8 +-- stasis/experimental/compression/rle.h | 18 +++--- .../compression/staticMulticolumn.h | 16 ++--- stasis/experimental/compression/staticTuple.h | 14 ++--- stasis/experimental/compression/tuple.h | 20 +++---- stasis/experimental/lsmIterators.h | 58 +++++++++---------- stasis/util/stlslab.h | 6 +- stasis/util/time.h | 2 +- test/check_impl.h | 2 +- test/check_setup.h | 2 +- test/lladd-old/abort-speed.c | 3 +- test/lladd-old/abort.c | 2 +- test/lladd-old/commit-speed.c | 3 +- test/lladd-old/db41/dbAbort.c | 2 +- test/lladd-old/db41/dbGet.c | 2 +- test/lladd-old/db41/dbInsert.c | 2 +- test/lladd-old/db41/dbInsertSequential.c | 2 +- test/lladd-old/db41/dbUpdate.c | 2 +- test/lladd-old/db41/jbhashmany.c | 5 +- test/lladd-old/db41/jbhashsimple.c | 2 +- test/lladd-old/inc_dec.c | 2 +- test/lladd-old/interleaved.c | 2 +- test/lladd-old/jbhashdisk.c | 2 +- test/lladd-old/jbhashmany.c | 2 +- test/lladd-old/jbht-speed.c | 2 +- test/lladd-old/jbhtsimple.c | 2 +- test/lladd-old/logvals.c | 2 +- test/lladd-old/loop.c | 2 +- test/lladd-old/nontrans.c | 2 +- test/lladd-old/prepare_1.c | 2 +- test/lladd-old/prepare_2.c | 2 +- test/lladd-old/prepare_3.c | 2 +- test/lladd-old/rand_str.c | 4 +- test/lladd-old/recover.c | 2 +- test/lladd-old/strings.c | 2 +- test/lladd-old/twentyfour.c | 2 +- test/lladd-old/twentyfour2.c | 2 +- test/monotree/binary_search.c | 2 +- test/monotree/bit_arithmetic.c | 2 +- test/monotree/soundness.c | 2 +- test/pobj/calendar.c | 2 +- test/pobj/stringlist.c | 2 +- test/pobj/test-multilist.c | 2 +- test/stasis/check_bufferManager.c | 2 +- test/stasis/check_logWriter.c | 4 +- test/stasis/check_operations.c | 4 +- test/stasis/check_replacementPolicy.c | 4 +- test/stasis/fault_injection/fichecker.c | 2 +- test/stasis/fault_injection/fisubject.c | 2 +- test/stasis/fault_injection/fitest.c | 4 +- utilities/logfile_dump.c | 2 +- 119 files changed, 262 insertions(+), 266 deletions(-) diff --git a/benchmarks/berkeleyDB/bdbHash.c b/benchmarks/berkeleyDB/bdbHash.c index d921f21..2c3eba3 100644 --- a/benchmarks/berkeleyDB/bdbHash.c +++ b/benchmarks/berkeleyDB/bdbHash.c @@ -101,7 +101,7 @@ main(int argc, char *argv[]) } void -env_dir_create() +env_dir_create(void) { struct stat sb; @@ -588,7 +588,7 @@ retry: /* Begin the transaction. */ } void -usage() +usage(void) { (void)fprintf(stderr, "usage: txnapp\n"); exit(1); diff --git a/benchmarks/berkeleyDB/bdbRaw.c b/benchmarks/berkeleyDB/bdbRaw.c index 03aa737..abdce73 100644 --- a/benchmarks/berkeleyDB/bdbRaw.c +++ b/benchmarks/berkeleyDB/bdbRaw.c @@ -101,7 +101,7 @@ main(int argc, char *argv[]) } void -env_dir_create() +env_dir_create(void) { struct stat sb; @@ -588,7 +588,7 @@ retry: /* Begin the transaction. */ } void -usage() +usage(void) { (void)fprintf(stderr, "usage: txnapp\n"); exit(1); diff --git a/benchmarks/berkeleyDB/genericBerkeleyDBCode.c b/benchmarks/berkeleyDB/genericBerkeleyDBCode.c index d8cea9e..199667c 100644 --- a/benchmarks/berkeleyDB/genericBerkeleyDBCode.c +++ b/benchmarks/berkeleyDB/genericBerkeleyDBCode.c @@ -5,7 +5,7 @@ DB *db_cats; int commitCount = 0; int putCount = 0; void -env_dir_create() +env_dir_create(void) { struct stat sb; @@ -317,7 +317,7 @@ retry: /* Begin the transaction. */ } void -usage() +usage(void) { (void)fprintf(stderr, "usage: txnapp\n"); exit(1); diff --git a/benchmarks/berkeleyDB/transapp.c b/benchmarks/berkeleyDB/transapp.c index 03aa737..abdce73 100644 --- a/benchmarks/berkeleyDB/transapp.c +++ b/benchmarks/berkeleyDB/transapp.c @@ -101,7 +101,7 @@ main(int argc, char *argv[]) } void -env_dir_create() +env_dir_create(void) { struct stat sb; @@ -588,7 +588,7 @@ retry: /* Begin the transaction. */ } void -usage() +usage(void) { (void)fprintf(stderr, "usage: txnapp\n"); exit(1); diff --git a/benchmarks/lsn_bench_common.h b/benchmarks/lsn_bench_common.h index 182f3a1..80b8c7c 100644 --- a/benchmarks/lsn_bench_common.h +++ b/benchmarks/lsn_bench_common.h @@ -91,11 +91,11 @@ int my_write_entry(struct stasis_log_t* log, LogEntry *e) { return original_write_entry(log,e); } -void emulate_remote_log() { +void emulate_remote_log(void) { original_write_entry = ((stasis_log_t*)stasis_log())->write_entry; ((stasis_log_t*)stasis_log())->write_entry = my_write_entry; } -void emulate_remote_pages() { +void emulate_remote_pages(void) { origWrite = stasis_page_impl_get(SLOTTED_LSN_FREE_PAGE)->recordWrite; origRead = stasis_page_impl_get(SLOTTED_LSN_FREE_PAGE)->recordRead; // xxx a bit of cheating; don't pay latency for lsn write diff --git a/benchmarks/seekMap.c b/benchmarks/seekMap.c index 1875525..5791010 100644 --- a/benchmarks/seekMap.c +++ b/benchmarks/seekMap.c @@ -16,7 +16,7 @@ static void my_pread_help(int fd, long long off) { } } -static void drop_buffers() { +static void drop_buffers(void) { int fd = open("/proc/sys/vm/drop_caches", O_TRUNC|O_WRONLY); if(fd == -1) { perror("Couldn't drop page cache"); abort(); } char * str = "1\n"; diff --git a/src/apps/referential/algebra.c b/src/apps/referential/algebra.c index 6e9008f..16423cf 100644 --- a/src/apps/referential/algebra.c +++ b/src/apps/referential/algebra.c @@ -815,7 +815,7 @@ lladdIterator_t* ReferentialAlgebra_ExecuteQuery(int xid, /** Initialize module (Must be called before anything else in this file). */ -void ReferentialAlgebra_init() { +void ReferentialAlgebra_init(void) { lladdIterator_def_t select_def = { s_close, s_next, s_tryNext, s_key, s_value, s_tupleDone }; diff --git a/src/apps/referential/tuple.c b/src/apps/referential/tuple.c index de9be58..ec7901f 100644 --- a/src/apps/referential/tuple.c +++ b/src/apps/referential/tuple.c @@ -103,7 +103,7 @@ void tupleFree(tuple_t tup) { if(tup.type) { free(tup.type); } } -tuple_t tupleAlloc() { +tuple_t tupleAlloc(void) { tuple_t ret; ret.count = 0; ret.type = 0; diff --git a/src/pobj/debug.c b/src/pobj/debug.c index d0c0136..0c0a3a6 100644 --- a/src/pobj/debug.c +++ b/src/pobj/debug.c @@ -67,7 +67,7 @@ debug_f_start (const char *func_str) } int -debug_f_end () +debug_f_end (void) { if (g_ncontexts == 0) return -1; diff --git a/src/stasis/allocationPolicy.c b/src/stasis/allocationPolicy.c index 943cf8f..11858a2 100644 --- a/src/stasis/allocationPolicy.c +++ b/src/stasis/allocationPolicy.c @@ -453,7 +453,7 @@ static int xidAllocedDealloced_cmp_xid_pageid(const void *ap, const void *bp, co ((a->pageid > b->pageid) ? 1 : 0))); } -stasis_allocation_policy_t * stasis_allocation_policy_init() { +stasis_allocation_policy_t * stasis_allocation_policy_init(void) { stasis_allocation_policy_t * ap = stasis_alloc(stasis_allocation_policy_t); ap->availablePages_key_pageid = rbinit(availablePages_cmp_pageid, 0); ap->availablePages_key_freespace_pageid = rbinit(availablePages_cmp_freespace_pageid, 0); diff --git a/src/stasis/bufferManager/legacy/legacyBufferManager.c b/src/stasis/bufferManager/legacy/legacyBufferManager.c index 3d3cf48..6fa79d7 100644 --- a/src/stasis/bufferManager/legacy/legacyBufferManager.c +++ b/src/stasis/bufferManager/legacy/legacyBufferManager.c @@ -96,7 +96,7 @@ stasis_buffer_manager_t* stasis_buffer_manager_deprecated_open(stasis_page_handl return bm; } -static void bufManBufDeinit() { +static void bufManBufDeinit(void) { DEBUG("pageCacheDeinit()"); @@ -130,7 +130,7 @@ static void bufManBufDeinit() { Just close file descriptors, don't do any other clean up. (For testing.) */ -static void bufManSimulateBufferManagerCrash() { +static void bufManSimulateBufferManagerCrash(void) { page_handle->close(page_handle); #ifdef PIN_COUNT pinCount = 0; diff --git a/src/stasis/bufferManager/legacy/pageCache.c b/src/stasis/bufferManager/legacy/pageCache.c index 3dcac90..e6eba39 100644 --- a/src/stasis/bufferManager/legacy/pageCache.c +++ b/src/stasis/bufferManager/legacy/pageCache.c @@ -38,7 +38,7 @@ void pageCacheInit(Page * first) { } -void pageCacheDeinit() { +void pageCacheDeinit(void) { } @@ -163,6 +163,6 @@ void cacheHitOnPage(Page * ret) { } } -Page * cacheStalePage() { +Page * cacheStalePage(void) { return repTail; } diff --git a/src/stasis/bufferManager/pageArray.c b/src/stasis/bufferManager/pageArray.c index a8cdc8f..8b00637 100644 --- a/src/stasis/bufferManager/pageArray.c +++ b/src/stasis/bufferManager/pageArray.c @@ -80,7 +80,7 @@ static int paCloseHandle(stasis_buffer_manager_t *bm, stasis_buffer_manager_hand return 0; // no error. } -stasis_buffer_manager_t * stasis_buffer_manager_mem_array_open () { +stasis_buffer_manager_t * stasis_buffer_manager_mem_array_open (void) { stasis_buffer_manager_t * bm = stasis_alloc(stasis_buffer_manager_t); stasis_buffer_manager_page_array_t * pa = stasis_alloc(stasis_buffer_manager_page_array_t); diff --git a/src/stasis/bufferPool.c b/src/stasis/bufferPool.c index c66884c..43367a8 100644 --- a/src/stasis/bufferPool.c +++ b/src/stasis/bufferPool.c @@ -62,7 +62,7 @@ struct stasis_buffer_pool_t { void * addr_to_free; }; -stasis_buffer_pool_t* stasis_buffer_pool_init() { +stasis_buffer_pool_t* stasis_buffer_pool_init(void) { stasis_buffer_pool_t * ret = stasis_alloc(stasis_buffer_pool_t); diff --git a/src/stasis/dirtyPageTable.c b/src/stasis/dirtyPageTable.c index ebc99ef..5c04e10 100644 --- a/src/stasis/dirtyPageTable.c +++ b/src/stasis/dirtyPageTable.c @@ -343,7 +343,7 @@ void stasis_dirty_page_table_set_buffer_manager(stasis_dirty_page_table_t * dpt, dpt->bufferManager = bufferManager; } -stasis_dirty_page_table_t * stasis_dirty_page_table_init() { +stasis_dirty_page_table_t * stasis_dirty_page_table_init(void) { stasis_dirty_page_table_t * ret = stasis_alloc(stasis_dirty_page_table_t); ret->outstanding_flush_lsns = stasis_util_multiset_create(); diff --git a/src/stasis/experimental/arrayCollection.c b/src/stasis/experimental/arrayCollection.c index 4660002..d70184e 100644 --- a/src/stasis/experimental/arrayCollection.c +++ b/src/stasis/experimental/arrayCollection.c @@ -63,7 +63,7 @@ typedef struct { static void noopTupDone(int xid, void * foo) { } -void stasis_arrayCollection_init() { +void stasis_arrayCollection_init(void) { lladdIterator_def_t array_def = { arrayIterator_close, arrayIterator_next, diff --git a/src/stasis/experimental/consumer.c b/src/stasis/experimental/consumer.c index 7eef443..7dda064 100644 --- a/src/stasis/experimental/consumer.c +++ b/src/stasis/experimental/consumer.c @@ -9,7 +9,7 @@ static void lladdConsumer_register(int type, lladdConsumer_def_t info) { consumers[type] = info; } -void consumer_init() { +void consumer_init(void) { lladdConsumer_def_t logMemory_def = { logMemory_consumer_push, logMemory_consumer_close diff --git a/src/stasis/experimental/fifo.c b/src/stasis/experimental/fifo.c index 0d1e8ed..9b86596 100644 --- a/src/stasis/experimental/fifo.c +++ b/src/stasis/experimental/fifo.c @@ -241,7 +241,7 @@ lladdFifoPool_t * lladdFifoPool_pointerPoolInit (int consumerCount, int pointerC return pool; } -void stasis_fifo_init() { +void stasis_fifo_init(void) { lladdIterator_def_t pointer_def = { lladdFifoPool_iterator_close, lladdFifoPool_iterator_next, diff --git a/src/stasis/experimental/group.c b/src/stasis/experimental/group.c index c0ec5ed..085f23c 100644 --- a/src/stasis/experimental/group.c +++ b/src/stasis/experimental/group.c @@ -112,7 +112,7 @@ static int stasis_log_structured_group_it_value(int xid, void* impl, byte** val) } static void stasis_log_structured_group_it_tupleDone(int xid, void* impl) {} -void stasis_log_structured_group_init() { +void stasis_log_structured_group_init(void) { static lladdIterator_def_t def = { stasis_log_structured_group_it_close, stasis_log_structured_group_it_next, diff --git a/src/stasis/experimental/lockManagerImpl.c b/src/stasis/experimental/lockManagerImpl.c index c31460f..577e224 100644 --- a/src/stasis/experimental/lockManagerImpl.c +++ b/src/stasis/experimental/lockManagerImpl.c @@ -73,7 +73,7 @@ typedef struct { int active; } lock; -void lockManagerInitHashed() { +void lockManagerInitHashed(void) { int i = 0; for(i = 0; i < MUTEX_COUNT; i++) { pthread_mutex_init(&mutexes[i], NULL); @@ -356,7 +356,7 @@ int lockManagerCommitPages(int xid) { return lockManagerCommitHashed(xid, sizeof(pageid_t)); } -void setupLockManagerCallbacksPage() { +void setupLockManagerCallbacksPage(void) { globalLockManager.init = &lockManagerInitHashed; globalLockManager.readLockPage = &lockManagerReadLockPage; globalLockManager.writeLockPage = &lockManagerWriteLockPage; @@ -371,7 +371,7 @@ void setupLockManagerCallbacksPage() { globalLockManager.init(); } -void setupLockManagerCallbacksRecord () { +void setupLockManagerCallbacksRecord (void) { globalLockManager.init = &lockManagerInitHashed; globalLockManager.readLockPage = NULL; globalLockManager.writeLockPage = NULL; diff --git a/src/stasis/experimental/logMemory.c b/src/stasis/experimental/logMemory.c index 14b98f4..5cca224 100644 --- a/src/stasis/experimental/logMemory.c +++ b/src/stasis/experimental/logMemory.c @@ -17,7 +17,7 @@ typedef struct { lsn_t eof; } logMemory_fifo_t; -void stasis_logMemory_init() { +void stasis_logMemory_init(void) { lladdIterator_def_t logMemory_def = { logMemory_Iterator_close, logMemory_Iterator_next, diff --git a/src/stasis/experimental/lsmTree.c b/src/stasis/experimental/lsmTree.c index 51e8ac1..102f889 100644 --- a/src/stasis/experimental/lsmTree.c +++ b/src/stasis/experimental/lsmTree.c @@ -768,7 +768,7 @@ static void lsmPageCleanup(Page *p) { /** A page_impl for the root of an lsmTree. */ -page_impl lsmRootImpl() { +page_impl lsmRootImpl(void) { page_impl pi = stasis_page_fixed_impl(); pi.pageLoaded = lsmPageLoaded; pi.pageFlushed = lsmPageFlushed; diff --git a/src/stasis/io/handle.c b/src/stasis/io/handle.c index 211eb6f..ba5d1e4 100644 --- a/src/stasis/io/handle.c +++ b/src/stasis/io/handle.c @@ -18,6 +18,6 @@ #include #include -stasis_handle_t* stasis_handle_default_factory() { +stasis_handle_t* stasis_handle_default_factory(void) { return stasis_handle_file_factory(stasis_store_file_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM); } diff --git a/src/stasis/io/memory.c b/src/stasis/io/memory.c index ec94024..0b19d1e 100644 --- a/src/stasis/io/memory.c +++ b/src/stasis/io/memory.c @@ -182,7 +182,7 @@ struct stasis_handle_t mem_func = { .error = 0 }; -stasis_handle_t * stasis_handle(open_memory)() { +stasis_handle_t * stasis_handle(open_memory)(void) { stasis_handle_t * ret = stasis_alloc(stasis_handle_t); if(!ret) { return NULL; } *ret = mem_func; diff --git a/src/stasis/io/raid0.c b/src/stasis/io/raid0.c index 1e5dafc..af2a7de 100644 --- a/src/stasis/io/raid0.c +++ b/src/stasis/io/raid0.c @@ -204,7 +204,7 @@ stasis_handle_t * stasis_handle_open_raid0(int handle_count, stasis_handle_t** h return ret; } -stasis_handle_t * stasis_handle_raid0_factory() { +stasis_handle_t * stasis_handle_raid0_factory(void) { if(stasis_handle_raid0_filenames == NULL) { stasis_handle_t * h[2]; h[0] = stasis_handle_file_factory(stasis_store_file_1_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM); diff --git a/src/stasis/io/raid1.c b/src/stasis/io/raid1.c index a2a3ec9..207d347 100644 --- a/src/stasis/io/raid1.c +++ b/src/stasis/io/raid1.c @@ -157,7 +157,7 @@ stasis_handle_t * stasis_handle_open_raid1(stasis_handle_t* a, stasis_handle_t* return ret; } -stasis_handle_t * stasis_handle_raid1_factory() { +stasis_handle_t * stasis_handle_raid1_factory(void) { stasis_handle_t * a = stasis_handle_file_factory(stasis_store_file_1_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM); stasis_handle_t * b = stasis_handle_file_factory(stasis_store_file_2_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM); return stasis_handle_open_raid1(a, b); diff --git a/src/stasis/iterator.c b/src/stasis/iterator.c index 411c5f2..b1d4089 100644 --- a/src/stasis/iterator.c +++ b/src/stasis/iterator.c @@ -12,7 +12,7 @@ void lladdIterator_register(int type, lladdIterator_def_t info) { iterators[type] = info; } -void iterator_init() { +void iterator_init(void) { /* no-op */ } diff --git a/src/stasis/lockManager.c b/src/stasis/lockManager.c index 9f720b3..9dfdc7d 100644 --- a/src/stasis/lockManager.c +++ b/src/stasis/lockManager.c @@ -9,7 +9,7 @@ LockManagerSetup globalLockManager; -void setupLockManagerCallbacksNil () { +void setupLockManagerCallbacksNil (void) { globalLockManager.init = NULL; globalLockManager.readLockPage = NULL; globalLockManager.writeLockPage = NULL; diff --git a/src/stasis/logger/inMemoryLog.c b/src/stasis/logger/inMemoryLog.c index 58caabe..68eee7b 100644 --- a/src/stasis/logger/inMemoryLog.c +++ b/src/stasis/logger/inMemoryLog.c @@ -188,7 +188,7 @@ static void stasis_log_impl_in_memory_set_truncation(stasis_log_t *log, stasis_t impl->trunc = trunc; } -stasis_log_t* stasis_log_impl_in_memory_open() { +stasis_log_t* stasis_log_impl_in_memory_open(void) { stasis_log_impl_in_memory * impl = stasis_alloc(stasis_log_impl_in_memory); impl->flushedLSN_lock = initlock(); impl->globalOffset_lock = initlock(); diff --git a/src/stasis/operations.c b/src/stasis/operations.c index 7ae29d9..b230517 100644 --- a/src/stasis/operations.c +++ b/src/stasis/operations.c @@ -56,7 +56,7 @@ void stasis_operation_impl_register(stasis_operation_impl o) { stasis_operation_table[o.id] = o; } static int stasis_operations_initted = 0; -void stasis_operation_table_init() { +void stasis_operation_table_init(void) { if(!stasis_operations_initted) { stasis_operations_initted = 1; for(int i = 0; i < MAX_OPERATIONS; i++) { diff --git a/src/stasis/operations/alloc.c b/src/stasis/operations/alloc.c index ad4ddba..ecd91ab 100644 --- a/src/stasis/operations/alloc.c +++ b/src/stasis/operations/alloc.c @@ -168,7 +168,7 @@ static int op_realloc(const LogEntry* e, Page* p) { return ret; } -stasis_operation_impl stasis_op_impl_alloc() { +stasis_operation_impl stasis_op_impl_alloc(void) { stasis_operation_impl o = { OPERATION_ALLOC, UNKNOWN_TYPE_PAGE, @@ -180,7 +180,7 @@ stasis_operation_impl stasis_op_impl_alloc() { } -stasis_operation_impl stasis_op_impl_dealloc() { +stasis_operation_impl stasis_op_impl_dealloc(void) { stasis_operation_impl o = { OPERATION_DEALLOC, UNKNOWN_TYPE_PAGE, @@ -192,7 +192,7 @@ stasis_operation_impl stasis_op_impl_dealloc() { } /*This is only used to undo deallocs... */ -stasis_operation_impl stasis_op_impl_realloc() { +stasis_operation_impl stasis_op_impl_realloc(void) { stasis_operation_impl o = { OPERATION_REALLOC, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/arrayList.c b/src/stasis/operations/arrayList.c index cf5857c..99d356e 100644 --- a/src/stasis/operations/arrayList.c +++ b/src/stasis/operations/arrayList.c @@ -98,7 +98,7 @@ static int array_list_op_init_header(const LogEntry* e, Page* p) { /*----------------------------------------------------------------------------*/ -stasis_operation_impl stasis_op_impl_array_list_header_init() { +stasis_operation_impl stasis_op_impl_array_list_header_init(void) { stasis_operation_impl o = { OPERATION_ARRAY_LIST_HEADER_INIT, UNINITIALIZED_PAGE, diff --git a/src/stasis/operations/bTree.c b/src/stasis/operations/bTree.c index 5b79074..19bbf96 100644 --- a/src/stasis/operations/bTree.c +++ b/src/stasis/operations/bTree.c @@ -25,7 +25,7 @@ static int stasis_btree_byte_array_comparator(const void * a, size_t alen, const return ret; } -void BtreeInit() { +void BtreeInit(void) { // todo: register iterator // register comparators @@ -33,7 +33,7 @@ void BtreeInit() { btree_comparators[BYTE_ARRAY_COMPARATOR] = stasis_btree_byte_array_comparator; } -void BtreeDeinit() { +void BtreeDeinit(void) { free(btree_comparators); } typedef struct { diff --git a/src/stasis/operations/blobs.c b/src/stasis/operations/blobs.c index f91974b..fe91a14 100644 --- a/src/stasis/operations/blobs.c +++ b/src/stasis/operations/blobs.c @@ -81,7 +81,7 @@ static void stasis_page_blob_flushed(Page *p) { } static void stasis_page_blob_cleanup(Page *p) { } -page_impl stasis_page_blob_impl() { +page_impl stasis_page_blob_impl(void) { page_impl pi = { BLOB_PAGE, 1, diff --git a/src/stasis/operations/decrement.c b/src/stasis/operations/decrement.c index 4c245fd..8d4a199 100644 --- a/src/stasis/operations/decrement.c +++ b/src/stasis/operations/decrement.c @@ -60,7 +60,7 @@ static int op_decrement(const LogEntry* e, Page* p) { return 0; } -stasis_operation_impl stasis_op_impl_decrement() { +stasis_operation_impl stasis_op_impl_decrement(void) { stasis_operation_impl o = { OPERATION_DECREMENT, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/increment.c b/src/stasis/operations/increment.c index 522b6eb..2916d28 100644 --- a/src/stasis/operations/increment.c +++ b/src/stasis/operations/increment.c @@ -61,7 +61,7 @@ static int op_increment(const LogEntry* e, Page* p) { return 0; } -stasis_operation_impl stasis_op_impl_increment() { +stasis_operation_impl stasis_op_impl_increment(void) { stasis_operation_impl o = { OPERATION_INCREMENT, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/linearHashNTA.c b/src/stasis/operations/linearHashNTA.c index 5e361fa..1f9ad42 100644 --- a/src/stasis/operations/linearHashNTA.c +++ b/src/stasis/operations/linearHashNTA.c @@ -35,7 +35,7 @@ typedef struct { static void noopTupDone(int xid, void * foo) { } -void LinearHashNTAInit() { +void LinearHashNTAInit(void) { // only need this function since PTHREAD_RECURSIVE_MUTEX_INITIALIZER is really broken... pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); @@ -53,7 +53,7 @@ void LinearHashNTAInit() { }; lladdIterator_register(LINEAR_HASH_NTA_ITERATOR, linearHashNTA_def); } -void LinearHashNTADeinit() { +void LinearHashNTADeinit(void) { pthread_mutex_destroy(&linear_hash_mutex); } @@ -143,7 +143,7 @@ static int op_linear_hash_remove(const LogEntry* e, Page* p) { return 0; } -stasis_operation_impl stasis_op_impl_linear_hash_insert() { +stasis_operation_impl stasis_op_impl_linear_hash_insert(void) { stasis_operation_impl o = { OPERATION_LINEAR_HASH_INSERT, UNKNOWN_TYPE_PAGE, @@ -153,7 +153,7 @@ stasis_operation_impl stasis_op_impl_linear_hash_insert() { }; return o; } -stasis_operation_impl stasis_op_impl_linear_hash_remove() { +stasis_operation_impl stasis_op_impl_linear_hash_remove(void) { stasis_operation_impl o = { OPERATION_LINEAR_HASH_REMOVE, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/linkedListNTA.c b/src/stasis/operations/linkedListNTA.c index b6299a4..efd8406 100644 --- a/src/stasis/operations/linkedListNTA.c +++ b/src/stasis/operations/linkedListNTA.c @@ -33,7 +33,7 @@ static pthread_mutex_t stasis_linked_list_mutex; -void TlinkedListNTAInit() { +void TlinkedListNTAInit(void) { // only need this function since PTHREAD_RECURSIVE_MUTEX_INITIALIZER is really broken... pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); @@ -41,7 +41,7 @@ void TlinkedListNTAInit() { pthread_mutex_init(&stasis_linked_list_mutex, &attr); pthread_mutexattr_destroy(&attr); } -void TlinkedListNTADeinit() { +void TlinkedListNTADeinit(void) { pthread_mutex_destroy(&stasis_linked_list_mutex); } @@ -123,7 +123,7 @@ int TlinkedListInsert(int xid, recordid list, const byte * key, int keySize, con return ret; } -stasis_operation_impl stasis_op_impl_linked_list_insert() { +stasis_operation_impl stasis_op_impl_linked_list_insert(void) { stasis_operation_impl o = { OPERATION_LINKED_LIST_INSERT, UNKNOWN_TYPE_PAGE, @@ -133,7 +133,7 @@ stasis_operation_impl stasis_op_impl_linked_list_insert() { }; return o; } -stasis_operation_impl stasis_op_impl_linked_list_remove() { +stasis_operation_impl stasis_op_impl_linked_list_remove(void) { stasis_operation_impl o = { OPERATION_LINKED_LIST_REMOVE, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/lsnFreeSet.c b/src/stasis/operations/lsnFreeSet.c index 2894a37..1b51104 100644 --- a/src/stasis/operations/lsnFreeSet.c +++ b/src/stasis/operations/lsnFreeSet.c @@ -94,7 +94,7 @@ int TsetWriteBack(int xid, pageid_t page, pageoff_t off, pageoff_t len, const vo return TsetReorderableWriteBack(xid,0,page,off,len,dat,olddat); } -stasis_operation_impl stasis_op_impl_lsn_free_set() { +stasis_operation_impl stasis_op_impl_lsn_free_set(void) { stasis_operation_impl o = { OPERATION_SET_LSN_FREE, SLOTTED_LSN_FREE_PAGE, @@ -105,7 +105,7 @@ stasis_operation_impl stasis_op_impl_lsn_free_set() { return o; } -stasis_operation_impl stasis_op_impl_lsn_free_set_inverse() { +stasis_operation_impl stasis_op_impl_lsn_free_set_inverse(void) { stasis_operation_impl o = { OPERATION_SET_LSN_FREE_INVERSE, SLOTTED_LSN_FREE_PAGE, diff --git a/src/stasis/operations/naiveLinearHash.c b/src/stasis/operations/naiveLinearHash.c index 7fb1da0..da800ec 100644 --- a/src/stasis/operations/naiveLinearHash.c +++ b/src/stasis/operations/naiveLinearHash.c @@ -390,11 +390,11 @@ recordid TnaiveHashCreate(int xid, int keySize, int valSize) { return rid; } -void TnaiveHashInit() { +void TnaiveHashInit(void) { openHashes = pblHtCreate(); } -void TnaiveHashDeinit() { +void TnaiveHashDeinit(void) { pblHtDelete(openHashes); } diff --git a/src/stasis/operations/noop.c b/src/stasis/operations/noop.c index 6b87f68..1078692 100644 --- a/src/stasis/operations/noop.c +++ b/src/stasis/operations/noop.c @@ -52,7 +52,7 @@ int noop(const LogEntry* e, Page* p) { return 0; } -stasis_operation_impl stasis_op_impl_noop() { +stasis_operation_impl stasis_op_impl_noop(void) { stasis_operation_impl o = { OPERATION_NOOP, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/pageOperations.c b/src/stasis/operations/pageOperations.c index 40be482..f43842d 100644 --- a/src/stasis/operations/pageOperations.c +++ b/src/stasis/operations/pageOperations.c @@ -150,7 +150,7 @@ int TpageGetType(int xid, pageid_t page) { */ -stasis_operation_impl stasis_op_impl_page_set_range() { +stasis_operation_impl stasis_op_impl_page_set_range(void) { stasis_operation_impl o = { OPERATION_PAGE_SET_RANGE, UNKNOWN_TYPE_PAGE, @@ -161,7 +161,7 @@ stasis_operation_impl stasis_op_impl_page_set_range() { return o; } -stasis_operation_impl stasis_op_impl_page_set_range_inverse() { +stasis_operation_impl stasis_op_impl_page_set_range_inverse(void) { stasis_operation_impl o = { OPERATION_PAGE_SET_RANGE_INVERSE, UNKNOWN_TYPE_PAGE, @@ -262,7 +262,7 @@ int TinitializeBlobPageRange(int xid, pageid_t start, pageid_t count) { Tupdate(xid, MULTI_PAGEID, &arg, sizeof(arg), OPERATION_INITIALIZE_MULTIPAGE); return 0; } -stasis_operation_impl stasis_op_impl_page_initialize() { +stasis_operation_impl stasis_op_impl_page_initialize(void) { stasis_operation_impl o = { OPERATION_INITIALIZE_PAGE, UNINITIALIZED_PAGE, @@ -272,7 +272,7 @@ stasis_operation_impl stasis_op_impl_page_initialize() { }; return o; } -stasis_operation_impl stasis_op_impl_multipage_initialize() { +stasis_operation_impl stasis_op_impl_multipage_initialize(void) { stasis_operation_impl o = { OPERATION_INITIALIZE_MULTIPAGE, MULTI_PAGE, diff --git a/src/stasis/operations/prepare.c b/src/stasis/operations/prepare.c index 66cf1ed..e00a16d 100644 --- a/src/stasis/operations/prepare.c +++ b/src/stasis/operations/prepare.c @@ -59,7 +59,7 @@ static int op_prepare(const LogEntry * e, Page * p) { return 0; } -stasis_operation_impl stasis_op_impl_prepare() { +stasis_operation_impl stasis_op_impl_prepare(void) { stasis_operation_impl o = { OPERATION_PREPARE, /* id */ UNKNOWN_TYPE_PAGE, @@ -79,7 +79,7 @@ typedef struct{ int aborted; } PrepareGuardState; -void * getPrepareGuardState() { +void * getPrepareGuardState(void) { PrepareGuardState * s = stasis_alloc(PrepareGuardState); s->continueIterating = 1; s->prevLSN = -1; diff --git a/src/stasis/operations/regions.c b/src/stasis/operations/regions.c index 6d5e5fb..31574d5 100644 --- a/src/stasis/operations/regions.c +++ b/src/stasis/operations/regions.c @@ -512,7 +512,7 @@ void TregionPrefetch(int xid, pageid_t firstPage) { pageid_t endOfRange = firstPage + TregionSize(xid, firstPage); bm->prefetchPages(bm, firstPage, endOfRange); } -stasis_operation_impl stasis_op_impl_boundary_tag_alloc() { +stasis_operation_impl stasis_op_impl_boundary_tag_alloc(void) { stasis_operation_impl o = { OPERATION_ALLOC_BOUNDARY_TAG, UNINITIALIZED_PAGE, @@ -523,7 +523,7 @@ stasis_operation_impl stasis_op_impl_boundary_tag_alloc() { return o; } -stasis_operation_impl stasis_op_impl_region_alloc() { +stasis_operation_impl stasis_op_impl_region_alloc(void) { stasis_operation_impl o = { OPERATION_ALLOC_REGION, UNKNOWN_TYPE_PAGE, @@ -533,7 +533,7 @@ stasis_operation_impl stasis_op_impl_region_alloc() { }; return o; } -stasis_operation_impl stasis_op_impl_region_alloc_inverse() { +stasis_operation_impl stasis_op_impl_region_alloc_inverse(void) { stasis_operation_impl o = { OPERATION_ALLOC_REGION_INVERSE, UNKNOWN_TYPE_PAGE, @@ -543,7 +543,7 @@ stasis_operation_impl stasis_op_impl_region_alloc_inverse() { }; return o; } -stasis_operation_impl stasis_op_impl_region_dealloc() { +stasis_operation_impl stasis_op_impl_region_dealloc(void) { stasis_operation_impl o = { OPERATION_DEALLOC_REGION, UNKNOWN_TYPE_PAGE, @@ -554,7 +554,7 @@ stasis_operation_impl stasis_op_impl_region_dealloc() { return o; } -stasis_operation_impl stasis_op_impl_region_dealloc_inverse() { +stasis_operation_impl stasis_op_impl_region_dealloc_inverse(void) { stasis_operation_impl o = { OPERATION_DEALLOC_REGION_INVERSE, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/operations/segmentFile.c b/src/stasis/operations/segmentFile.c index d43ead9..4f75103 100644 --- a/src/stasis/operations/segmentFile.c +++ b/src/stasis/operations/segmentFile.c @@ -127,7 +127,7 @@ static int op_segment_file_pwrite_inverse(const LogEntry* e, Page* p) { return 0; } -stasis_operation_impl stasis_op_impl_segment_file_pwrite() { +stasis_operation_impl stasis_op_impl_segment_file_pwrite(void) { static stasis_operation_impl o = { OPERATION_SEGMENT_FILE_PWRITE, SEGMENT_PAGE, @@ -138,7 +138,7 @@ stasis_operation_impl stasis_op_impl_segment_file_pwrite() { return o; } -stasis_operation_impl stasis_op_impl_segment_file_pwrite_inverse() { +stasis_operation_impl stasis_op_impl_segment_file_pwrite_inverse(void) { static stasis_operation_impl o = { OPERATION_SEGMENT_FILE_PWRITE_INVERSE, SEGMENT_PAGE, diff --git a/src/stasis/operations/set.c b/src/stasis/operations/set.c index 4ce10f6..5668ef9 100644 --- a/src/stasis/operations/set.c +++ b/src/stasis/operations/set.c @@ -221,7 +221,7 @@ void TsetRange(int xid, recordid rid, int offset, int length, const void * dat) releasePage(p); } -stasis_operation_impl stasis_op_impl_set() { +stasis_operation_impl stasis_op_impl_set(void) { stasis_operation_impl o = { OPERATION_SET, UNKNOWN_TYPE_PAGE, @@ -232,7 +232,7 @@ stasis_operation_impl stasis_op_impl_set() { return o; } -stasis_operation_impl stasis_op_impl_set_inverse() { +stasis_operation_impl stasis_op_impl_set_inverse(void) { stasis_operation_impl o = { OPERATION_SET_INVERSE, UNKNOWN_TYPE_PAGE, @@ -243,7 +243,7 @@ stasis_operation_impl stasis_op_impl_set_inverse() { return o; } -stasis_operation_impl stasis_op_impl_set_range() { +stasis_operation_impl stasis_op_impl_set_range(void) { stasis_operation_impl o = { OPERATION_SET_RANGE, UNKNOWN_TYPE_PAGE, @@ -254,7 +254,7 @@ stasis_operation_impl stasis_op_impl_set_range() { return o; } -stasis_operation_impl stasis_op_impl_set_range_inverse() { +stasis_operation_impl stasis_op_impl_set_range_inverse(void) { stasis_operation_impl o = { OPERATION_SET_RANGE_INVERSE, UNKNOWN_TYPE_PAGE, diff --git a/src/stasis/page.c b/src/stasis/page.c index 3b01e27..41ed405 100644 --- a/src/stasis/page.c +++ b/src/stasis/page.c @@ -122,7 +122,7 @@ void stasis_page_init(stasis_dirty_page_table_t * dpt) { stasis_page_impl_register(stasis_page_slotted_latch_free_impl()); } -void stasis_page_deinit() { +void stasis_page_deinit(void) { for(int i = 0; i < MAX_PAGE_TYPE; i++) { page_impl p = { 0 }; diff --git a/src/stasis/page/fixed.c b/src/stasis/page/fixed.c index 3c8eca5..326fd78 100644 --- a/src/stasis/page/fixed.c +++ b/src/stasis/page/fixed.c @@ -114,7 +114,7 @@ static void stasis_page_fixed_flushed(Page *p) { } static void stasis_page_fixed_cleanup(Page *p) { } -page_impl stasis_page_fixed_impl() { +page_impl stasis_page_fixed_impl(void) { static page_impl pi = { FIXED_PAGE, 1, @@ -150,11 +150,11 @@ page_impl stasis_page_fixed_impl() { /** @todo arrayListImpl belongs in arrayList.c */ -page_impl stasis_page_array_list_impl() { +page_impl stasis_page_array_list_impl(void) { page_impl pi = stasis_page_fixed_impl(); pi.page_type = ARRAY_LIST_PAGE; return pi; } -void stasis_page_fixed_init() { } -void stasis_page_fixed_deinit() { } +void stasis_page_fixed_init(void) { } +void stasis_page_fixed_deinit(void) { } diff --git a/src/stasis/page/lsnFree.c b/src/stasis/page/lsnFree.c index 6cb13c2..841ac82 100644 --- a/src/stasis/page/lsnFree.c +++ b/src/stasis/page/lsnFree.c @@ -7,7 +7,7 @@ void stasis_page_slotted_lsn_free_initialize_page(Page * p) { p->pageType = SLOTTED_LSN_FREE_PAGE; } -page_impl slottedLsnFreeImpl() { +page_impl slottedLsnFreeImpl(void) { page_impl pi = stasis_page_slotted_impl(); pi.has_header = 0; pi.page_type = SLOTTED_LSN_FREE_PAGE; diff --git a/src/stasis/page/segment.c b/src/stasis/page/segment.c index 741d69c..99d8420 100644 --- a/src/stasis/page/segment.c +++ b/src/stasis/page/segment.c @@ -9,7 +9,7 @@ static int notSupported(int xid, Page * p) { return 0; } -page_impl segmentImpl() { +page_impl segmentImpl(void) { static page_impl pi = { SEGMENT_PAGE, 0, // has header diff --git a/src/stasis/page/slotted.c b/src/stasis/page/slotted.c index 33f6c83..99dc6fd 100644 --- a/src/stasis/page/slotted.c +++ b/src/stasis/page/slotted.c @@ -141,7 +141,7 @@ void stasis_page_slotted_initialize_page(Page * page) { stasis_page_slotted_initialize_page_raw(page); } -void stasis_page_slotted_init() { +void stasis_page_slotted_init(void) { #ifdef SLOTTED_PAGE_CHECK_FOR_OVERLAP #ifdef SLOTTED_PAGE_OLD_CHECKS printf("slotted.c: Using expensive page sanity checking.\n"); @@ -149,10 +149,10 @@ void stasis_page_slotted_init() { #endif } -void stasis_page_slotted_deinit() { +void stasis_page_slotted_deinit(void) { } -page_impl stasis_page_slotted_impl() { +page_impl stasis_page_slotted_impl(void) { static page_impl pi = { SLOTTED_PAGE, 1, @@ -185,7 +185,7 @@ static page_impl pi = { return pi; } -page_impl stasis_page_boundary_tag_impl() { +page_impl stasis_page_boundary_tag_impl(void) { page_impl p = stasis_page_slotted_impl(); p.page_type = BOUNDARY_TAG_PAGE; return p; diff --git a/src/stasis/page/uninitialized.c b/src/stasis/page/uninitialized.c index 053a5e3..8a079a7 100644 --- a/src/stasis/page/uninitialized.c +++ b/src/stasis/page/uninitialized.c @@ -21,7 +21,7 @@ static void uninitializedCleanup(Page *p) { } -page_impl stasis_page_uninitialized_impl() { +page_impl stasis_page_uninitialized_impl(void) { static page_impl pi = { UNINITIALIZED_PAGE, 1, //has header diff --git a/src/stasis/replacementPolicy/lru.c b/src/stasis/replacementPolicy/lru.c index 6af96e6..4655e9c 100644 --- a/src/stasis/replacementPolicy/lru.c +++ b/src/stasis/replacementPolicy/lru.c @@ -86,7 +86,7 @@ static void stasis_replacement_policy_lru_insert(replacementPolicy* r, Page* p) assert(e == old); } -replacementPolicy * stasis_replacement_policy_lru_init() { +replacementPolicy * stasis_replacement_policy_lru_init(void) { replacementPolicy * ret = stasis_alloc(replacementPolicy); stasis_replacement_policy_lru_t * l = stasis_alloc(stasis_replacement_policy_lru_t); l->now = 0; diff --git a/src/stasis/replacementPolicy/lruFast.c b/src/stasis/replacementPolicy/lruFast.c index 720b511..85aa5fa 100644 --- a/src/stasis/replacementPolicy/lruFast.c +++ b/src/stasis/replacementPolicy/lruFast.c @@ -109,7 +109,7 @@ static void stasis_lru_fast_deinit(struct replacementPolicy * r) { free(l); free(r); } -replacementPolicy * lruFastInit() { +replacementPolicy * lruFastInit(void) { struct replacementPolicy * ret = stasis_alloc(struct replacementPolicy); ret->deinit = stasis_lru_fast_deinit; ret->hit = stasis_lru_fast_hit; diff --git a/src/stasis/transactionTable.c b/src/stasis/transactionTable.c index 8648732..b982a09 100644 --- a/src/stasis/transactionTable.c +++ b/src/stasis/transactionTable.c @@ -187,7 +187,7 @@ int* stasis_transaction_table_list_active(stasis_transaction_table_t *tbl, int * return ret; } -stasis_transaction_table_t * stasis_transaction_table_init() { +stasis_transaction_table_t * stasis_transaction_table_init(void) { stasis_transaction_table_t * tbl = stasis_alloc(stasis_transaction_table_t); tbl->active_count = 0; diff --git a/src/stasis/transactional2.c b/src/stasis/transactional2.c index 0d9dc3a..b65ff49 100644 --- a/src/stasis/transactional2.c +++ b/src/stasis/transactional2.c @@ -38,20 +38,20 @@ static stasis_alloc_t * stasis_alloc = 0; static stasis_allocation_policy_t * stasis_allocation_policy = 0; static stasis_buffer_manager_t * stasis_buffer_manager = 0; -void * stasis_runtime_buffer_manager() { +void * stasis_runtime_buffer_manager(void) { return stasis_buffer_manager; } -void * stasis_runtime_dirty_page_table() { +void * stasis_runtime_dirty_page_table(void) { return stasis_dirty_page_table; } -void * stasis_runtime_transaction_table() { +void * stasis_runtime_transaction_table(void) { return stasis_transaction_table; } -void * stasis_runtime_alloc_state() { +void * stasis_runtime_alloc_state(void) { return stasis_alloc; } -stasis_log_t* stasis_log_default_factory() { +stasis_log_t* stasis_log_default_factory(void) { stasis_log_t *log_file = 0; if(LOG_TO_DIR == stasis_log_type) { log_file = stasis_log_file_pool_open(stasis_log_dir_name, @@ -71,7 +71,7 @@ stasis_log_t* stasis_log_default_factory() { return log_file; } -int Tinit() { +int Tinit(void) { stasis_initted = 1; stasis_operation_table_init(); @@ -109,7 +109,7 @@ int Tinit() { return 0; } -int Tbegin() { +int Tbegin(void) { assert(stasis_initted); @@ -327,7 +327,7 @@ int Tcommit(int xid) { int TsoftCommit(int xid) { return TcommitHelper(xid, 0); // 0 -> don't force write log. } -void TforceCommits() { +void TforceCommits(void) { stasis_log_force(stasis_log_file, INVALID_LSN, LOG_FORCE_COMMIT); } @@ -372,7 +372,7 @@ int Tforget(int xid) { stasis_transaction_table_forget(stasis_transaction_table, t->xid); return 0; } -int Tdeinit() { +int Tdeinit(void) { int count; int * active = stasis_transaction_table_list_active(stasis_transaction_table, &count); @@ -412,7 +412,7 @@ int Tdeinit() { return 0; } -int TuncleanShutdown() { +int TuncleanShutdown(void) { // We're simulating a crash; don't complain when writes get lost, // and active transactions get rolled back. stasis_suppress_unclean_shutdown_warnings = 1; @@ -436,7 +436,7 @@ int TuncleanShutdown() { return 0; } -int TdurabilityLevel() { +int TdurabilityLevel(void) { if(stasis_buffer_manager_factory == stasis_buffer_manager_mem_array_factory) { return VOLATILE; } else if(stasis_log_type == LOG_TO_MEMORY) { @@ -446,7 +446,7 @@ int TdurabilityLevel() { } } -void TtruncateLog() { +void TtruncateLog(void) { stasis_truncation_truncate(stasis_truncation, 1); } typedef struct { @@ -518,6 +518,6 @@ int TisActiveTransaction(stasis_transaction_fingerprint_t * fp) { && stasis_transaction_table_get(stasis_transaction_table, fp->xid)->recLSN == fp->rec_lsn; } -void * stasis_log() { +void * stasis_log(void) { return stasis_log_file; } diff --git a/src/stasis/util/lhtable.c b/src/stasis/util/lhtable.c index 8045161..add9fb8 100644 --- a/src/stasis/util/lhtable.c +++ b/src/stasis/util/lhtable.c @@ -402,7 +402,7 @@ void LH_ENTRY(destroy) (struct LH_ENTRY(table) * t) { free(t); } -void LH_ENTRY(stats)(){ +void LH_ENTRY(stats)(void) { #ifdef MEASURE_GLOBAL_BUCKET_LENGTH pthread_mutex_lock(&stat_mutex); diff --git a/src/stasis/util/multiset.c b/src/stasis/util/multiset.c index 5662ab8..c515566 100644 --- a/src/stasis/util/multiset.c +++ b/src/stasis/util/multiset.c @@ -7,7 +7,7 @@ struct stasis_util_multiset_t { intptr_t item_count; }; -stasis_util_multiset_t * stasis_util_multiset_create() { +stasis_util_multiset_t * stasis_util_multiset_create(void) { stasis_util_multiset_t * set = stasis_alloc(stasis_util_multiset_t); set->items = stasis_alloc(lsn_t); set->item_count = 0; diff --git a/src/stasis/util/redblack.c b/src/stasis/util/redblack.c index 85ef461..d2b9ab3 100644 --- a/src/stasis/util/redblack.c +++ b/src/stasis/util/redblack.c @@ -72,7 +72,7 @@ static void RB_ENTRY(_free)(struct RB_ENTRY(node) *); #else -static struct RB_ENTRY(node) *RB_ENTRY(_alloc)() {return (struct RB_ENTRY(node) *) malloc(sizeof(struct RB_ENTRY(node)));} +static struct RB_ENTRY(node) *RB_ENTRY(_alloc)(void) {return (struct RB_ENTRY(node) *) malloc(sizeof(struct RB_ENTRY(node)));} static void RB_ENTRY(_free)(struct RB_ENTRY(node) *x) {free(x);} #endif @@ -926,8 +926,7 @@ static struct RB_ENTRY(node) *rbfreep=NULL; #define RB_ENTRY(NODE)ALLOC_CHUNK_SIZE 1000 static struct RB_ENTRY(node) * -RB_ENTRY(_alloc)() -{ +RB_ENTRY(_alloc)(void) { struct RB_ENTRY(node) *x; int i; diff --git a/src/timing/getTimeOfDay.c b/src/timing/getTimeOfDay.c index b5f9fc3..466f3b1 100644 --- a/src/timing/getTimeOfDay.c +++ b/src/timing/getTimeOfDay.c @@ -42,7 +42,7 @@ terms specified in this license. #include #include -int main() { +int main(void) { unsigned long l; struct timeval t; diff --git a/stasis/experimental/compression/compression.h b/stasis/experimental/compression/compression.h index ac0eced..11f4d5b 100644 --- a/stasis/experimental/compression/compression.h +++ b/stasis/experimental/compression/compression.h @@ -51,7 +51,7 @@ static const slot_index_t INVALID_COL = UCHAR_MAX; */ template -inline plugin_id_t plugin_id() { +inline plugin_id_t plugin_id(void) { /* type_idx maps from sizeof(TYPE) to a portion of a page type: (u)int8_t -> 0 diff --git a/stasis/experimental/compression/for.h b/stasis/experimental/compression/for.h index d06bc48..ef0ccc6 100644 --- a/stasis/experimental/compression/for.h +++ b/stasis/experimental/compression/for.h @@ -62,7 +62,7 @@ class For { The size of the scratch space reserved at the end of the page for speculative execution. */ - inline size_t max_overrun() { return sizeof(delta_t) + sizeof(TYPE); } + inline size_t max_overrun(void) { return sizeof(delta_t) + sizeof(TYPE); } /** Append a new value to a compressed portion of a page. This @@ -128,7 +128,7 @@ class For { }; For(void * mem): mem_(mem) {} - inline slot_index_t recordCount() { + inline slot_index_t recordCount(void) { return *numdeltas_ptr(); } @@ -136,7 +136,7 @@ class For { /** @return the length of the FOR region, in bytes */ - inline byte_off_t bytes_used() { + inline byte_off_t bytes_used(void) { return ((intptr_t)(last_delta_ptr()+1)) - (intptr_t)mem_; } @@ -154,20 +154,20 @@ class For { static const delta_t DELTA_MAX = (sizeof(delta_t) == 1) ? CHAR_MAX : (sizeof(delta_t) == 2) ? SHRT_MAX : INT_MAX; static const delta_t DELTA_MIN = (sizeof(delta_t) == 1) ? CHAR_MIN : (sizeof(delta_t) == 2) ? SHRT_MIN : INT_MIN; - inline TYPE offset() { return *base_ptr(); } + inline TYPE offset(void) { return *base_ptr(); } - inline TYPE* base_ptr() { return reinterpret_cast(mem_); } + inline TYPE* base_ptr(void) { return reinterpret_cast(mem_); } - inline slot_index_t* numdeltas_ptr() { + inline slot_index_t* numdeltas_ptr(void) { return reinterpret_cast(base_ptr()+1); } inline delta_t * nth_delta_ptr(slot_index_t n) { return reinterpret_cast(numdeltas_ptr()+1) + n; } - inline delta_t * last_delta_ptr() { + inline delta_t * last_delta_ptr(void) { return nth_delta_ptr(*numdeltas_ptr()-1); } - inline delta_t * next_delta_ptr() { + inline delta_t * next_delta_ptr(void) { return nth_delta_ptr(*numdeltas_ptr()); } void * mem_; diff --git a/stasis/experimental/compression/multicolumn-impl.h b/stasis/experimental/compression/multicolumn-impl.h index d3b4169..729c002 100644 --- a/stasis/experimental/compression/multicolumn-impl.h +++ b/stasis/experimental/compression/multicolumn-impl.h @@ -67,7 +67,7 @@ Multicolumn::Multicolumn(Page * p) : } template -void Multicolumn::pack() { +void Multicolumn::pack(void) { byte_off_t first_free = 0; byte_off_t last_free = (intptr_t)(first_header_byte_ptr() - p_->memAddr); if(unpacked_) { @@ -95,7 +95,7 @@ void Multicolumn::pack() { } template -Multicolumn::~Multicolumn() { +Multicolumn::~Multicolumn(void) { for(int i = 0; i < *column_count_ptr(); i++) { if(unpacked_) delete [] columns_[i]; } @@ -237,7 +237,7 @@ static const page_impl multicolumn_impl = { // manipulate more than one type of tuple.. template inline plugin_id_t -Multicolumn::plugin_id() { +Multicolumn::plugin_id(void) { return USER_DEFINED_PAGE(0) + 32 + TUPLE::TUPLE_ID; } @@ -260,7 +260,7 @@ static void multicolumnCleanup(Page *p) { } template -page_impl Multicolumn::impl() { +page_impl Multicolumn::impl(void) { page_impl ret = multicolumn_impl; ret.page_type = Multicolumn::plugin_id(); ret.pageLoaded = multicolumnLoaded; diff --git a/stasis/experimental/compression/multicolumn.h b/stasis/experimental/compression/multicolumn.h index e91e600..e0316b7 100644 --- a/stasis/experimental/compression/multicolumn.h +++ b/stasis/experimental/compression/multicolumn.h @@ -120,13 +120,13 @@ template class Multicolumn { explanation of where these pointers are stored */ - inline column_number_t * column_count_ptr() { + inline column_number_t * column_count_ptr(void) { return reinterpret_cast(p_->memAddr+USABLE_SIZE_OF_PAGE)-1; } - inline byte_off_t * exceptions_offset_ptr() { + inline byte_off_t * exceptions_offset_ptr(void) { return reinterpret_cast(column_count_ptr())-1; } - inline byte_off_t * exceptions_len_ptr() { + inline byte_off_t * exceptions_len_ptr(void) { return exceptions_offset_ptr()-1;; } inline column_header * column_header_ptr(column_number_t column_number) { @@ -153,7 +153,7 @@ template class Multicolumn { inline byte * column_base_ptr(column_number_t column_number) { return *column_offset_ptr(column_number) + p_->memAddr; } - inline byte * first_header_byte_ptr() { + inline byte * first_header_byte_ptr(void) { return reinterpret_cast(column_header_ptr((*column_count_ptr())-1)); } diff --git a/stasis/experimental/compression/nop.h b/stasis/experimental/compression/nop.h index 7830b37..bf032a8 100644 --- a/stasis/experimental/compression/nop.h +++ b/stasis/experimental/compression/nop.h @@ -28,7 +28,7 @@ namespace rose { static const int PLUGIN_ID = 2; inline void offset(TYPE o) {} - inline size_t max_overrun() { return sizeof(TYPE); } + inline size_t max_overrun(void) { return sizeof(TYPE); } inline slot_index_t append(int xid, const TYPE dat, byte_off_t * except, byte * exceptions, int *free_bytes) { slot_index_t ret = *numentries_ptr(); @@ -80,18 +80,18 @@ namespace rose { Nop(void * mem): mem_(mem) { } Nop() : mem_(0) {} - inline slot_index_t recordCount() { + inline slot_index_t recordCount(void) { return *numentries_ptr(); } - inline byte_off_t bytes_used() {return sizeof(slot_index_t) + ( *numentries_ptr() * sizeof(TYPE) ); } + inline byte_off_t bytes_used(void) {return sizeof(slot_index_t) + ( *numentries_ptr() * sizeof(TYPE) ); } inline void mem(byte * mem) { mem_=mem; } inline void init_mem(byte* mem) { mem_=mem; *numentries_ptr() = 0; } private: - inline slot_index_t* numentries_ptr() { + inline slot_index_t* numentries_ptr(void) { return reinterpret_cast(mem_); } void * mem_; diff --git a/stasis/experimental/compression/pageLayout.h b/stasis/experimental/compression/pageLayout.h index 55e46de..3adc60d 100644 --- a/stasis/experimental/compression/pageLayout.h +++ b/stasis/experimental/compression/pageLayout.h @@ -9,7 +9,7 @@ namespace rose { class SingleColumnTypePageLayout { public: typedef FORMAT FMT; - static inline void initPageLayout() { + static inline void initPageLayout(void) { stasis_page_impl_register(FMT::impl()); // XXX these should register template instantiations of worker @@ -41,10 +41,10 @@ namespace rose { free(plugins); return f; } - static inline int cmp_id() { + static inline int cmp_id(void) { return my_cmp_num; } - static inline int init_id() { + static inline int init_id(void) { return my_init_num; } private: @@ -65,7 +65,7 @@ namespace rose { class StaticMultiColumnTypePageLayout { public: typedef FORMAT FMT; - static inline void initPageLayout() { + static inline void initPageLayout(void) { stasis_page_impl_register(FMT::impl()); // XXX these should register template instantiations of worker @@ -106,10 +106,10 @@ namespace rose { return f; } - static inline int cmp_id() { + static inline int cmp_id(void) { return my_cmp_num; } - static inline int init_id() { + static inline int init_id(void) { return my_init_num; } private: @@ -150,10 +150,10 @@ namespace rose { } return f; } - static inline int cmp_id() { + static inline int cmp_id(void) { return my_cmp_num; } - static inline int init_id() { + static inline int init_id(void) { return my_init_num; } private: diff --git a/stasis/experimental/compression/pluginDispatcher.h b/stasis/experimental/compression/pluginDispatcher.h index bdccba3..c3890c3 100644 --- a/stasis/experimental/compression/pluginDispatcher.h +++ b/stasis/experimental/compression/pluginDispatcher.h @@ -188,7 +188,7 @@ class PluginDispatcher{ dispatchSwitch(c,caseSetPlugin,mem); } - ~PluginDispatcher() { + ~PluginDispatcher(void) { for(column_number_t i = 0; i < column_count_; i++) { dispatchSwitch(i,caseDelPlugin,0); } diff --git a/stasis/experimental/compression/pstar-impl.h b/stasis/experimental/compression/pstar-impl.h index c3073c1..b9dbb74 100644 --- a/stasis/experimental/compression/pstar-impl.h +++ b/stasis/experimental/compression/pstar-impl.h @@ -97,7 +97,7 @@ static const page_impl pstar_impl = { */ template page_impl -Pstar::impl() { +Pstar::impl(void) { page_impl ret = pstar_impl; ret.page_type = plugin_id,COMPRESSOR,TYPE>(); ret.pageLoaded = pStarLoaded; diff --git a/stasis/experimental/compression/pstar.h b/stasis/experimental/compression/pstar.h index 094c190..b0c5a21 100644 --- a/stasis/experimental/compression/pstar.h +++ b/stasis/experimental/compression/pstar.h @@ -28,7 +28,7 @@ template class Pstar { free_bytes_ = *freespace_ptr() - plug_.bytes_used() - plug_.max_overrun(); p->impl = this; } - inline void pack() { }; + inline void pack(void) { }; /** Append a new value to a page managed by pstar. @@ -82,7 +82,7 @@ template class Pstar { } */ return ret; } - inline COMPRESSOR * compressor() { return &plug_; } + inline COMPRESSOR * compressor(void) { return &plug_; } static page_impl impl(); @@ -95,10 +95,10 @@ template class Pstar { free_bytes_ = *freespace_ptr() - plug_.bytes_used() - plug_.max_overrun(); } - inline byte_off_t * freespace_ptr() { + inline byte_off_t * freespace_ptr(void) { return reinterpret_cast(p_->memAddr+USABLE_SIZE_OF_PAGE)-1; } - inline record_size_t * recordsize_ptr() { + inline record_size_t * recordsize_ptr(void) { return reinterpret_cast(freespace_ptr())-1; } diff --git a/stasis/experimental/compression/rle.h b/stasis/experimental/compression/rle.h index e943085..8774c48 100644 --- a/stasis/experimental/compression/rle.h +++ b/stasis/experimental/compression/rle.h @@ -32,7 +32,7 @@ class Rle { static const int PLUGIN_ID = 1; inline void offset(TYPE off) { nth_block_ptr(0)->data = off; }; - inline size_t max_overrun() { return sizeof(triple_t); } + inline size_t max_overrun(void) { return sizeof(triple_t); } /** @see For::append */ inline slot_index_t append(int xid, const TYPE dat, @@ -46,7 +46,7 @@ class Rle { recordFind(int xid, slot_index_t start, slot_index_t stop, byte *exceptions, TYPE value, std::pair& scratch); - void init_getspecific() { + void init_getspecific(void) { // int ret =pthread_key_create(&last_key_, 0); // assert(!ret); } @@ -67,7 +67,7 @@ class Rle { init_getspecific(); // pthread_mutex_init(&last_mut_,0); } - inline slot_index_t recordCount() { + inline slot_index_t recordCount(void) { triple_t *n = last_block_ptr(); return (n->index) + (n->copies); } @@ -83,13 +83,13 @@ class Rle { init_getspecific(); } - ~Rle() { + ~Rle(void) { // pthread_key_delete(last_key_); } /** @see For::bytes_used(); */ - inline byte_off_t bytes_used() { + inline byte_off_t bytes_used(void) { return ((intptr_t)(last_block_ptr()+1))-(intptr_t)mem_; } @@ -112,8 +112,8 @@ class Rle { // assert(!ret); } private: - inline TYPE offset() { return nth_block_ptr(0)->dat; } - inline block_index_t* block_count_ptr() { + inline TYPE offset(void) { return nth_block_ptr(0)->dat; } + inline block_index_t* block_count_ptr(void) { return reinterpret_cast(mem_); } inline triple_t* nth_block_ptr(block_index_t n) { @@ -136,10 +136,10 @@ class Rle { // return &((reinterpret_cast(block_count_ptr()+1) + n)->data); return &(nth_block_ptr(n)->data); } - inline triple_t* last_block_ptr() { + inline triple_t* last_block_ptr(void) { return nth_block_ptr(*block_count_ptr()-1); } - inline triple_t* new_block_ptr() { + inline triple_t* new_block_ptr(void) { return nth_block_ptr(*block_count_ptr()); } void * mem_; diff --git a/stasis/experimental/compression/staticMulticolumn.h b/stasis/experimental/compression/staticMulticolumn.h index 5eefc2a..c81866a 100644 --- a/stasis/experimental/compression/staticMulticolumn.h +++ b/stasis/experimental/compression/staticMulticolumn.h @@ -154,7 +154,7 @@ class StaticMulticolumn { p->impl = this; } - ~StaticMulticolumn() { + ~StaticMulticolumn(void) { #define STATIC_MC_DEINIT(i,plug) \ if(i < N) { \ @@ -440,7 +440,7 @@ class StaticMulticolumn { } } - inline void pack() { + inline void pack(void) { assertlocked(p_->rwlatch); #ifdef PACK_STATS if(pack_first) { @@ -573,13 +573,13 @@ class StaticMulticolumn { explanation of where these pointers are stored */ - inline column_number_t * column_count_ptr() { + inline column_number_t * column_count_ptr(void) { return reinterpret_cast(p_->memAddr+USABLE_SIZE_OF_PAGE)-1; } - inline byte_off_t * exceptions_offset_ptr() { + inline byte_off_t * exceptions_offset_ptr(void) { return reinterpret_cast(column_count_ptr())-1; } - inline byte_off_t * exceptions_len_ptr() { + inline byte_off_t * exceptions_len_ptr(void) { return exceptions_offset_ptr()-1;; } inline column_header * column_header_ptr(column_number_t column_number) { @@ -606,11 +606,11 @@ class StaticMulticolumn { inline byte * column_base_ptr(column_number_t column_number) { return *column_offset_ptr(column_number) + p_->memAddr; } - inline byte * first_header_byte_ptr() { + inline byte * first_header_byte_ptr(void) { return reinterpret_cast(column_header_ptr((*column_count_ptr())-1)); } - static inline plugin_id_t plugin_id() { + static inline plugin_id_t plugin_id(void) { // XXX collides with multicolumn.h return USER_DEFINED_PAGE(0) + 32 + TUPLE::TUPLE_ID; } @@ -696,7 +696,7 @@ template -page_impl StaticMulticolumn::impl() { +page_impl StaticMulticolumn::impl(void) { page_impl ret = static_multicolumn_impl; ret.page_type = StaticMulticolumn::plugin_id(); ret.pageLoaded = staticMulticolumnLoaded; diff --git a/stasis/experimental/compression/staticTuple.h b/stasis/experimental/compression/staticTuple.h index cb158b0..286c76b 100644 --- a/stasis/experimental/compression/staticTuple.h +++ b/stasis/experimental/compression/staticTuple.h @@ -44,7 +44,7 @@ namespace rose { return s.flag_ == TOMBSTONE; } - explicit inline StaticTuple() { + explicit inline StaticTuple(void) { s.flag_ = NORMAL; s.epoch_ = 0 ; initializePointers(); } @@ -74,9 +74,9 @@ namespace rose { initializePointers(); } - inline ~StaticTuple() { } + inline ~StaticTuple(void) { } - static inline byte_off_t sizeofBytes() { + static inline byte_off_t sizeofBytes(void) { // Computing by starting from zero, and adding up column costs wouldn't // take struct padding into account. This might over-estimate the // size, but that's fine, since any in-memory copy will either be malloced @@ -491,7 +491,7 @@ namespace rose { scratch_() {} inline explicit iterator(const iterator &i) : c_(i.c_), dat_(i.dat_), off_(i.off_), scratch_() {} - inline StaticTuple& operator*() { + inline StaticTuple& operator*(void) { if(0 < N) scratch_.set0((TYPE0*)dat_[0][off_]); if(1 < N) scratch_.set1((TYPE1*)dat_[1][off_]); if(2 < N) scratch_.set2((TYPE2*)dat_[2][off_]); @@ -521,8 +521,8 @@ namespace rose { inline bool operator!=(const iterator &a) const { return(off_!=a.off); } - inline void operator++() { off_++; } - inline void operator--() { off_--; } + inline void operator++(void) { off_++; } + inline void operator--(void) { off_--; } inline void operator+=(int i) { abort(); } inline int operator-(iterator &i) { return off_ - i.off_; @@ -572,7 +572,7 @@ namespace rose { st s; - inline void initializePointers() { + inline void initializePointers(void) { if(first_) { st str; if(0 < N) cols_[0] = (byte*)&str.cols0_ - (byte*)&str; diff --git a/stasis/experimental/compression/tuple.h b/stasis/experimental/compression/tuple.h index ef8072f..43fd15d 100644 --- a/stasis/experimental/compression/tuple.h +++ b/stasis/experimental/compression/tuple.h @@ -49,8 +49,8 @@ class Tuple { cols_[c] = t->cols_[c]; } } */ - inline ~Tuple() { delete[] cols_; delete[] byteArray_; } - inline bool tombstone() { + inline ~Tuple(void) { delete[] cols_; delete[] byteArray_; } + inline bool tombstone(void) { return false; } inline TYPE * set(column_number_t col,void* val) { @@ -79,19 +79,19 @@ class Tuple { cols_[i] = newCols[i]; } } */ - inline byte* toByteArray() { + inline byte* toByteArray(void) { byte* ret = byteArray_; memcpy(ret, &count_, sizeof(count_)); memcpy(ret+sizeof(count_), cols_, count_ * sizeof(TYPE)); return ret; } - /* inline operator const byte * () { + /* inline operator const byte * (void) { return toByteArray(); } */ - inline operator TYPE () { + inline operator TYPE (void) { return cols_[0]; //*get(0); } - /* inline operator TYPE () { + /* inline operator TYPE (void) { assert(count_ == 0); return cols_[0]; } */ @@ -132,7 +132,7 @@ class Tuple { inline explicit iterator(const iterator &i) : c_(i.c_), dat_(i.dat_), off_(i.off_), scratch_(c_) {} - inline Tuple& operator*() { + inline Tuple& operator*(void) { for(column_number_t i = 0; i < c_; i++) { scratch_.set(i,(void*)&dat_[i][off_]); } @@ -146,8 +146,8 @@ class Tuple { //assert(dat_==a.dat_ && c_==a.c_); return (off_!=a.off_); } - inline void operator++() { off_++; } - inline void operator--() { off_--; } + inline void operator++(void) { off_++; } + inline void operator--(void) { off_--; } inline void operator+=(int i) { abort(); } inline int operator-(iterator&i) { return off_ - i.off_; @@ -168,7 +168,7 @@ class Tuple { }; static const uint32_t TIMESTAMP = 0; private: - Tuple() { abort(); } + Tuple(void) { abort(); } explicit Tuple(const Tuple& t) { abort(); } column_number_t count_; TYPE * const cols_; diff --git a/stasis/experimental/lsmIterators.h b/stasis/experimental/lsmIterators.h index 5c33877..57e322f 100644 --- a/stasis/experimental/lsmIterators.h +++ b/stasis/experimental/lsmIterators.h @@ -96,18 +96,18 @@ class gcIterator { beginning_of_time_(t.beginning_of_time_), ts_col_(t.ts_col_) { } - ~gcIterator() { + ~gcIterator(void) { if (freeIt) { delete i_; } } - ROW & operator*() { + ROW & operator*(void) { // Both should pass, comment out for perf //assert(!went_back_); //assert(have_current_); return current_; } - bool get_next() { + bool get_next(void) { // assert(!went_back_); // assert(!at_end_); while(!have_newest_) { @@ -147,7 +147,7 @@ class gcIterator { // return (*i_) != (*a.i_); return !(*this == a); } - inline void operator++() { + inline void operator++(void) { if(went_back_) { went_back_ = false; } else { @@ -165,11 +165,11 @@ class gcIterator { } } } - inline void operator--() { + inline void operator--(void) { // assert(!went_back_); went_back_ = true; } - /* inline gcIterator* end() { + /* inline gcIterator* end(void) { return new gcIterator(i_->end()); } */ private: @@ -202,7 +202,7 @@ class gcIterator { return 1; } - //explicit gcIterator() { abort(); } + //explicit gcIterator(void) { abort(); } void operator=(gcIterator & t) { abort(); } int operator-(gcIterator & t) { abort(); } ITER * i_; @@ -230,7 +230,7 @@ class gcIterator { template class treeIterator { private: - inline void init_helper() { + inline void init_helper(void) { if(!lsmIterator_) { currentPage_ = 0; pageid_ = -1; @@ -323,7 +323,7 @@ class treeIterator { currentPage_((PAGELAYOUT*)((p_)?p_->impl:0)) { if(p_) { readlock(p_->rwlatch,0); } } - ~treeIterator() { + ~treeIterator(void) { if(lsmIterator_) { lsmTreeIterator_close(-1, lsmIterator_); } @@ -333,7 +333,7 @@ class treeIterator { p_ = 0; } } - ROW & operator*() { + ROW & operator*(void) { assert(this->lsmIterator_); ROW* readTuple = currentPage_->recordRead(-1,slot_, &scratch_); @@ -371,16 +371,16 @@ class treeIterator { inline bool operator!=(const treeIterator &a) const { return !(*this==a); } - inline void operator++() { + inline void operator++(void) { slot_++; } - inline void operator--() { + inline void operator--(void) { // This iterator consumes its input, and only partially supports // "==". "--" is just for book keeping, so we don't need to worry // about setting the other state. slot_--; } - inline treeIterator* end() { + inline treeIterator* end(void) { treeIterator* t = new treeIterator(tree_,scratch_,keylen_); if(!lsmIterator_) { t->slot_ = 0; @@ -410,7 +410,7 @@ class treeIterator { return t; } private: - explicit treeIterator() { abort(); } + explicit treeIterator(void) { abort(); } void operator=(treeIterator & t) { abort(); } int operator-(treeIterator & t) { abort(); } recordid tree_; @@ -481,7 +481,7 @@ class mergeIterator { before_eof_(i.before_eof_) { } - const ROW& operator* () { + const ROW& operator* (void) { if(curr_ == A) { return *a_; } if(curr_ == B || curr_ == BOTH) { return *b_; } abort(); @@ -490,7 +490,7 @@ class mergeIterator { if(curr_ == B || curr_ == BOTH) { return *b_; } abort(); } - void seekEnd() { + void seekEnd(void) { curr_ = NONE; } // XXX Only works if exactly one of the comparators is derived from end. @@ -505,7 +505,7 @@ class mergeIterator { inline bool operator!=(const mergeIterator &o) const { return !(*this == o); } - inline void operator++() { + inline void operator++(void) { off_++; if(curr_ == BOTH) { ++a_; @@ -516,7 +516,7 @@ class mergeIterator { } curr_ = calcCurr(curr_); } - inline void operator--() { + inline void operator--(void) { off_--; if(curr_ == BOTH) { --a_; @@ -543,7 +543,7 @@ class mergeIterator { curr_ = i.curr_; before_eof_ = i.before_eof_; } - inline unsigned int offset() { return off_; } + inline unsigned int offset(void) { return off_; } private: unsigned int off_; ITERA a_; @@ -580,10 +580,10 @@ class versioningIterator { off_(i.off_) {} - const ROW& operator* () { + const ROW& operator* (void) { return *a_; } - void seekEnd() { + void seekEnd(void) { a_.seekEnd();// = aend_; // XXX good idea? } inline bool operator==(const versioningIterator &o) const { @@ -592,7 +592,7 @@ class versioningIterator { inline bool operator!=(const versioningIterator &o) const { return !(*this == o); } - inline void operator++() { + inline void operator++(void) { if(check_tombstone_) { do { ++a_; @@ -608,7 +608,7 @@ class versioningIterator { } off_++; } - inline void operator--() { + inline void operator--(void) { --a_; // need to remember that we backed up so that ++ can work... // the cursor is always positioned on a live value, and -- can @@ -627,7 +627,7 @@ class versioningIterator { // scratch_ = *a_; off_ = i.off_; } - inline unsigned int offset() { return off_; } + inline unsigned int offset(void) { return off_; } private: ITER a_; ITER aend_; @@ -652,22 +652,22 @@ class versioningIterator { stlSetIterator( SET * s ) : it_(s->begin()), itend_(s->end()) {} stlSetIterator( STLITER& it, STLITER& itend ) : it_(it), itend_(itend) {} explicit stlSetIterator(stlSetIterator &i) : it_(i.it_), itend_(i.itend_){} - const ROW& operator* () { return *it_; } + const ROW& operator* (void) { return *it_; } - void seekEnd() { + void seekEnd(void) { it_ = itend_; // XXX good idea? } - stlSetIterator * end() { return new stlSetIterator(itend_,itend_); } + stlSetIterator * end(void) { return new stlSetIterator(itend_,itend_); } inline bool operator==(const stlSetIterator &o) const { return it_ == o.it_; } inline bool operator!=(const stlSetIterator &o) const { return !(*this == o); } - inline void operator++() { + inline void operator++(void) { ++it_; } - inline void operator--() { + inline void operator--(void) { --it_; } inline int operator-(stlSetIterator&i) { diff --git a/stasis/util/stlslab.h b/stasis/util/stlslab.h index 4453a84..7404f9b 100644 --- a/stasis/util/stlslab.h +++ b/stasis/util/stlslab.h @@ -24,7 +24,7 @@ public: typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; - stlslab ( ) throw() { + stlslab ( void ) throw() { alloc = stasis_util_slab_create(sizeof(T), 65536); } stlslab ( const stlslab& s) throw() { @@ -42,7 +42,7 @@ public: //assert(alloc); stasis_util_slab_ref(alloc); } - ~stlslab () { + ~stlslab (void) { stasis_util_slab_destroy(alloc); } pointer address ( reference x ) const { return &x; } @@ -60,7 +60,7 @@ public: assert(n == 1); stasis_util_slab_free(alloc, p); } - size_type max_size() const throw() { return 1; } + size_type max_size(void) const throw() { return 1; } void construct ( pointer p, const_reference val ) { new ((void*)p) T (val); } void destroy (pointer p) {((T*)p)->~T(); } stasis_util_slab_t * alloc; diff --git a/stasis/util/time.h b/stasis/util/time.h index 5932f5d..2fae56e 100644 --- a/stasis/util/time.h +++ b/stasis/util/time.h @@ -13,7 +13,7 @@ #include "log2.h" -static inline unsigned long long stasis_get_tsc() { +static inline unsigned long long stasis_get_tsc(void) { unsigned long long tsc; asm volatile ("rdtsc" : "=A" (tsc)); return tsc; diff --git a/test/check_impl.h b/test/check_impl.h index 2991eb7..084d1b9 100644 --- a/test/check_impl.h +++ b/test/check_impl.h @@ -15,7 +15,7 @@ #define CK_NORMAL 0 -#define START_TEST(x) static void x() { +#define START_TEST(x) static void x(void) { #define END_TEST } static int reaper_enabled = 0; diff --git a/test/check_setup.h b/test/check_setup.h index ed00f51..cce071c 100644 --- a/test/check_setup.h +++ b/test/check_setup.h @@ -42,7 +42,7 @@ terms specified in this license. /** A simple test utility to make sure that check is installed and working. */ -int main() { +int main(void) { int nf; Suite *s = check_suite(); SRunner *sr = srunner_create(s); diff --git a/test/lladd-old/abort-speed.c b/test/lladd-old/abort-speed.c index 1713818..62b33a0 100644 --- a/test/lladd-old/abort-speed.c +++ b/test/lladd-old/abort-speed.c @@ -52,8 +52,7 @@ terms specified in this license. #define TESTS 500 -int test() -{ +int test(void) { struct timeval start, end, total; recordid rids[TESTS]; long commited[TESTS]; diff --git a/test/lladd-old/abort.c b/test/lladd-old/abort.c index f3e8a4c..9e9bd59 100644 --- a/test/lladd-old/abort.c +++ b/test/lladd-old/abort.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int xid_0; int writeVal_0; int readVal_0; diff --git a/test/lladd-old/commit-speed.c b/test/lladd-old/commit-speed.c index 4264855..29e8fae 100644 --- a/test/lladd-old/commit-speed.c +++ b/test/lladd-old/commit-speed.c @@ -52,8 +52,7 @@ terms specified in this license. #define TESTS 500 -int test() -{ +int test(void) { struct timeval start, end, total; recordid rids[TESTS]; long commited[TESTS]; diff --git a/test/lladd-old/db41/dbAbort.c b/test/lladd-old/db41/dbAbort.c index 67e645c..cbccde8 100644 --- a/test/lladd-old/db41/dbAbort.c +++ b/test/lladd-old/db41/dbAbort.c @@ -202,7 +202,7 @@ void env_open(DB_ENV **dbenvp) { } -void env_dir_create() { +void env_dir_create(void) { struct stat sb; diff --git a/test/lladd-old/db41/dbGet.c b/test/lladd-old/db41/dbGet.c index 3124e9b..bbca513 100644 --- a/test/lladd-old/db41/dbGet.c +++ b/test/lladd-old/db41/dbGet.c @@ -193,7 +193,7 @@ void env_open(DB_ENV **dbenvp) { } -void env_dir_create() { +void env_dir_create(void) { struct stat sb; diff --git a/test/lladd-old/db41/dbInsert.c b/test/lladd-old/db41/dbInsert.c index 1f8b362..b2f8ff7 100644 --- a/test/lladd-old/db41/dbInsert.c +++ b/test/lladd-old/db41/dbInsert.c @@ -228,7 +228,7 @@ void env_open(DB_ENV **dbenvp) { } -void env_dir_create() { +void env_dir_create(void) { struct stat sb; diff --git a/test/lladd-old/db41/dbInsertSequential.c b/test/lladd-old/db41/dbInsertSequential.c index 2614488..6be2056 100644 --- a/test/lladd-old/db41/dbInsertSequential.c +++ b/test/lladd-old/db41/dbInsertSequential.c @@ -202,7 +202,7 @@ void env_open(DB_ENV **dbenvp) { } -void env_dir_create() { +void env_dir_create(void) { struct stat sb; diff --git a/test/lladd-old/db41/dbUpdate.c b/test/lladd-old/db41/dbUpdate.c index 9629ca1..fa92547 100644 --- a/test/lladd-old/db41/dbUpdate.c +++ b/test/lladd-old/db41/dbUpdate.c @@ -204,7 +204,7 @@ void env_open(DB_ENV **dbenvp) { } -void env_dir_create() { +void env_dir_create(void) { struct stat sb; diff --git a/test/lladd-old/db41/jbhashmany.c b/test/lladd-old/db41/jbhashmany.c index 9d5fdb6..e3cde6f 100644 --- a/test/lladd-old/db41/jbhashmany.c +++ b/test/lladd-old/db41/jbhashmany.c @@ -62,7 +62,7 @@ void env_open(DB_ENV **); -int main() { +int main(void) { DB *dbp; DB_ENV *dbenv; DB_TXN *xid; @@ -120,8 +120,7 @@ err: if ((t_ret = dbp->close(dbp, 0)) != 0 && ret == 0) } void -env_dir_create() -{ +env_dir_create(void) { struct stat sb; diff --git a/test/lladd-old/db41/jbhashsimple.c b/test/lladd-old/db41/jbhashsimple.c index 8b115fb..4073cfc 100644 --- a/test/lladd-old/db41/jbhashsimple.c +++ b/test/lladd-old/db41/jbhashsimple.c @@ -52,7 +52,7 @@ terms specified in this license. -int main() { +int main(void) { DB *dbp; DBT key1, dat1, key2, dat2, key3, dat3, key4, dat4; int ret, i, t_ret; diff --git a/test/lladd-old/inc_dec.c b/test/lladd-old/inc_dec.c index 3a01f97..4ae33b3 100644 --- a/test/lladd-old/inc_dec.c +++ b/test/lladd-old/inc_dec.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int i; int xid, writeVal, readVal; recordid rec; diff --git a/test/lladd-old/interleaved.c b/test/lladd-old/interleaved.c index 0b01680..cf5ff50 100644 --- a/test/lladd-old/interleaved.c +++ b/test/lladd-old/interleaved.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int xid_0; int writeVal_0; int readVal_0; diff --git a/test/lladd-old/jbhashdisk.c b/test/lladd-old/jbhashdisk.c index f4e73f0..25808cd 100644 --- a/test/lladd-old/jbhashdisk.c +++ b/test/lladd-old/jbhashdisk.c @@ -53,7 +53,7 @@ typedef struct { char *value; } test_pair_t; -int test() { +int test(void) { unsigned int i, xid; const unsigned int INSERT_NUM = 10000; /* should be > JB_HASHTABLE_SIZE */ diff --git a/test/lladd-old/jbhashmany.c b/test/lladd-old/jbhashmany.c index b7fc568..a4c84b8 100644 --- a/test/lladd-old/jbhashmany.c +++ b/test/lladd-old/jbhashmany.c @@ -53,7 +53,7 @@ typedef struct { * Test of jb persistant hash with many entries */ -int test() { +int test(void) { unsigned int i, xid; const unsigned int INSERT_NUM = 10000; /* should be > JB_HASHTABLE_SIZE */ diff --git a/test/lladd-old/jbht-speed.c b/test/lladd-old/jbht-speed.c index 581b553..7c3e836 100644 --- a/test/lladd-old/jbht-speed.c +++ b/test/lladd-old/jbht-speed.c @@ -55,7 +55,7 @@ typedef struct { * Test of persistant hash with many entries */ -int test() { +int test(void) { struct timeval start, end, total; unsigned int i, xid; diff --git a/test/lladd-old/jbhtsimple.c b/test/lladd-old/jbhtsimple.c index ec22829..030fa35 100644 --- a/test/lladd-old/jbhtsimple.c +++ b/test/lladd-old/jbhtsimple.c @@ -53,7 +53,7 @@ typedef struct { * Simple test of persistant hash table */ -int test() { +int test(void) { test_pair_t one = { 1, "one" }; test_pair_t two = { 2, "two" }; diff --git a/test/lladd-old/logvals.c b/test/lladd-old/logvals.c index 5c46a3e..45b8729 100644 --- a/test/lladd-old/logvals.c +++ b/test/lladd-old/logvals.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int xid_0; int writeVal_0; int readVal_0; diff --git a/test/lladd-old/loop.c b/test/lladd-old/loop.c index 111b27d..0f3b64f 100644 --- a/test/lladd-old/loop.c +++ b/test/lladd-old/loop.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int xid, writeVal, readVal, i; recordid rec; diff --git a/test/lladd-old/nontrans.c b/test/lladd-old/nontrans.c index d5d8003..8f60cdc 100644 --- a/test/lladd-old/nontrans.c +++ b/test/lladd-old/nontrans.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int writeVal, i; int *wptr= (int *)malloc(sizeof(int)); diff --git a/test/lladd-old/prepare_1.c b/test/lladd-old/prepare_1.c index 2845d73..7c139b4 100644 --- a/test/lladd-old/prepare_1.c +++ b/test/lladd-old/prepare_1.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int i; int xid, writeVal, readVal; recordid rec; diff --git a/test/lladd-old/prepare_2.c b/test/lladd-old/prepare_2.c index 8b3920d..1512d6f 100644 --- a/test/lladd-old/prepare_2.c +++ b/test/lladd-old/prepare_2.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int i; int writeVal, readVal; diff --git a/test/lladd-old/prepare_3.c b/test/lladd-old/prepare_3.c index ae016a0..2cb03a9 100644 --- a/test/lladd-old/prepare_3.c +++ b/test/lladd-old/prepare_3.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int i; int writeVal, readVal; diff --git a/test/lladd-old/rand_str.c b/test/lladd-old/rand_str.c index 15c3399..e60eba7 100644 --- a/test/lladd-old/rand_str.c +++ b/test/lladd-old/rand_str.c @@ -48,7 +48,7 @@ terms specified in this license. char *LONG_STRING; int LONG_STRING_LENGTH; -void rand_str_init() { +void rand_str_init(void) { char c; char first_printable_ascii = ' '; @@ -63,7 +63,7 @@ void rand_str_init() { srand(SEED); } -char *rand_str() { +char *rand_str(void) { char *string; double r; diff --git a/test/lladd-old/recover.c b/test/lladd-old/recover.c index e6dc6b5..2f0d82a 100644 --- a/test/lladd-old/recover.c +++ b/test/lladd-old/recover.c @@ -48,7 +48,7 @@ terms specified in this license. #include "../../src/lladd/recovery.h" #include "test.h" -int test() { +int test(void) { InitiateRecovery(); return 0; } diff --git a/test/lladd-old/strings.c b/test/lladd-old/strings.c index ad5454d..11cbab6 100644 --- a/test/lladd-old/strings.c +++ b/test/lladd-old/strings.c @@ -50,7 +50,7 @@ terms specified in this license. #define VERBOSE 0 #define SEED 5095 -int test() { +int test(void) { int xid; int NUM_TRIALS=100; recordid rec; diff --git a/test/lladd-old/twentyfour.c b/test/lladd-old/twentyfour.c index 71415e1..7e9543b 100644 --- a/test/lladd-old/twentyfour.c +++ b/test/lladd-old/twentyfour.c @@ -48,7 +48,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int xid; char *handle_in = "jkit"; char *name_in = "Jimmy Kittiyachavalit"; diff --git a/test/lladd-old/twentyfour2.c b/test/lladd-old/twentyfour2.c index b028e02..d49c37f 100644 --- a/test/lladd-old/twentyfour2.c +++ b/test/lladd-old/twentyfour2.c @@ -47,7 +47,7 @@ terms specified in this license. #include "test.h" -int test() { +int test(void) { int xid; char *handle_in = "jkit"; char *name_in = "Jimmy Kittiyachavalit"; diff --git a/test/monotree/binary_search.c b/test/monotree/binary_search.c index a3ab7fa..0c9dd2e 100644 --- a/test/monotree/binary_search.c +++ b/test/monotree/binary_search.c @@ -42,7 +42,7 @@ terms specified in this license. #include "../../src/libdfa/monotree.h" #include #include -int main () { +int main (void) { MonoTree * rb; int size = 100; state_machine_id i; diff --git a/test/monotree/bit_arithmetic.c b/test/monotree/bit_arithmetic.c index 046776c..92731e4 100644 --- a/test/monotree/bit_arithmetic.c +++ b/test/monotree/bit_arithmetic.c @@ -44,7 +44,7 @@ terms specified in this license. #include "../../libdfa/libdfa.h" int round_size_up(int orig_size); -int main () { +int main (void) { printf("Testing round_size_up"); diff --git a/test/monotree/soundness.c b/test/monotree/soundness.c index 9f667d3..ca80e7f 100644 --- a/test/monotree/soundness.c +++ b/test/monotree/soundness.c @@ -46,7 +46,7 @@ terms specified in this license. #include #include -int main () { +int main (void) { MonoTree * rb; diff --git a/test/pobj/calendar.c b/test/pobj/calendar.c index de505b5..82e8178 100644 --- a/test/pobj/calendar.c +++ b/test/pobj/calendar.c @@ -367,7 +367,7 @@ void process(String *str) { } } -void usage() { +void usage(void) { printf("Simple calendar program. Reads in commands from stdin.\n\n"); printf("Commands:\n"); printf("A -- adds the specified entry into the calendar\n"); diff --git a/test/pobj/stringlist.c b/test/pobj/stringlist.c index 37fa189..b949dc1 100644 --- a/test/pobj/stringlist.c +++ b/test/pobj/stringlist.c @@ -42,7 +42,7 @@ void process(char *line) { pobj_static_set_ref(&list, tmp); } -void print() { +void print(void) { int i = 1; Node *tmp = list; printf("Entries: \n"); diff --git a/test/pobj/test-multilist.c b/test/pobj/test-multilist.c index b0093b3..36136cc 100644 --- a/test/pobj/test-multilist.c +++ b/test/pobj/test-multilist.c @@ -24,7 +24,7 @@ pthread_mutex_t *lock; Node *head = NULL; Node *tail = NULL; -void print() { +void print(void) { Node *tmp = head; while (tmp != NULL) { printf("%s\n", tmp->data); diff --git a/test/stasis/check_bufferManager.c b/test/stasis/check_bufferManager.c index f24e742..ac8bc51 100644 --- a/test/stasis/check_bufferManager.c +++ b/test/stasis/check_bufferManager.c @@ -45,7 +45,7 @@ #endif // LONG_TEST #define MAX_TRANS_LENGTH 100 // Number of writes per transaction. Keeping this low allows truncation. -void initializePages() { +void initializePages(void) { int i; diff --git a/test/stasis/check_logWriter.c b/test/stasis/check_logWriter.c index 39ce922..9192bfc 100644 --- a/test/stasis/check_logWriter.c +++ b/test/stasis/check_logWriter.c @@ -68,7 +68,7 @@ LogEntry * dupLogEntry(stasis_log_t * log, const LogEntry *e) { return ret; } -static stasis_log_t * setup_log() { +static stasis_log_t * setup_log(void) { int i; lsn_t prevLSN = -1; int xid = 42; @@ -594,7 +594,7 @@ START_TEST(loggerTruncateReopenTest) { reopenLogWorkload(1); } END_TEST -static void loggerEmptyForce_helper() { +static void loggerEmptyForce_helper(void) { Tinit(); int xid = Tbegin(); TsoftCommit(xid); diff --git a/test/stasis/check_operations.c b/test/stasis/check_operations.c index b64fe8f..0f3556a 100644 --- a/test/stasis/check_operations.c +++ b/test/stasis/check_operations.c @@ -798,7 +798,7 @@ static int op_test_undo_impl(const LogEntry * e, Page * p) { return 0; } -static stasis_operation_impl op_test_logical_redo_impl() { +static stasis_operation_impl op_test_logical_redo_impl(void) { stasis_operation_impl o = { OPERATION_TEST_LOGICAL_REDO, MULTI_PAGE, @@ -808,7 +808,7 @@ static stasis_operation_impl op_test_logical_redo_impl() { }; return o; } -static stasis_operation_impl op_test_logical_undo_impl() { +static stasis_operation_impl op_test_logical_undo_impl(void) { stasis_operation_impl o = { OPERATION_TEST_LOGICAL_UNDO, MULTI_PAGE, diff --git a/test/stasis/check_replacementPolicy.c b/test/stasis/check_replacementPolicy.c index 8dc18c2..cb87398 100644 --- a/test/stasis/check_replacementPolicy.c +++ b/test/stasis/check_replacementPolicy.c @@ -27,7 +27,7 @@ static int cachedCount = 0; tracker * t; Page* pages; -void randomSetup() { +void randomSetup(void) { time_t seed = time(0); printf("\nSeed = %ld\n", seed); srandom(seed); @@ -43,7 +43,7 @@ void randomSetup() { } } -void randomTeardown() { +void randomTeardown(void) { free(t); free(pages); } diff --git a/test/stasis/fault_injection/fichecker.c b/test/stasis/fault_injection/fichecker.c index 0df6fe4..28fd466 100644 --- a/test/stasis/fault_injection/fichecker.c +++ b/test/stasis/fault_injection/fichecker.c @@ -43,7 +43,7 @@ terms specified in this license. #include "fitest.h" int -runChecker() { +runChecker(void) { int hashVal, fd, i, xid, k; int *commitTable = NULL, *insertTable = NULL, tableLength; int *key, **bkey, *value, **bvalue; diff --git a/test/stasis/fault_injection/fisubject.c b/test/stasis/fault_injection/fisubject.c index 4a31a5b..bd285a5 100644 --- a/test/stasis/fault_injection/fisubject.c +++ b/test/stasis/fault_injection/fisubject.c @@ -62,7 +62,7 @@ static void writeKeyToBuffer(char** insertBuffer, int* bufferCurrentLength, static void writeBufferToLog(int log, char* insertBuffer, int bufferCurrentLength); int -runSubject() { +runSubject(void) { pthread_t* threads; pthread_attr_t attr; intptr_t k; diff --git a/test/stasis/fault_injection/fitest.c b/test/stasis/fault_injection/fitest.c index 7d1c07d..ca51d85 100644 --- a/test/stasis/fault_injection/fitest.c +++ b/test/stasis/fault_injection/fitest.c @@ -202,7 +202,7 @@ runMaster(const char* execname, int interactive) { } void -writeGlobalsToSharedBuffer() { +writeGlobalsToSharedBuffer(void) { FILE* iterFile; iterFile = fopen("iterinfo.txt", "w"); @@ -214,7 +214,7 @@ writeGlobalsToSharedBuffer() { } void -readGlobalsFromSharedBuffer() { +readGlobalsFromSharedBuffer(void) { FILE* iterFile; iterFile = fopen("iterinfo.txt", "r"); diff --git a/utilities/logfile_dump.c b/utilities/logfile_dump.c index a766550..0566a2a 100644 --- a/utilities/logfile_dump.c +++ b/utilities/logfile_dump.c @@ -59,7 +59,7 @@ static char * logEntryToString(const LogEntry * le) { return ret; } -int main() { +int main(void) { LogHandle* lh; const LogEntry * le;