From: Andres Freund Date: Sat, 15 Aug 2015 15:25:00 +0000 (+0200) Subject: Don't use function definitions looking like old-style ones. X-Git-Tag: REL9_6_BETA1~1475 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e95126cf048b08d7ff5eb72ec33737e9e27c08f8;p=postgresql Don't use function definitions looking like old-style ones. This fixes a bunch of somewhat pedantic warnings with new compilers. Since by far the majority of other functions definitions use the (void) style it just seems to be consistent to do so as well in the remaining few places. --- diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index 861caea348..5eac2b1e49 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -171,7 +171,7 @@ CustomizableInitialize(void) * Is the requested file ready yet? */ static bool -CustomizableNextWALFileReady() +CustomizableNextWALFileReady(void) { if (stat(WALFilePath, &stat_buf) == 0) { diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 177d1e1432..d48d101340 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -295,7 +295,7 @@ AtAbort_Twophase(void) * PGXACT entry. */ void -PostPrepare_Twophase() +PostPrepare_Twophase(void) { LWLockAcquire(TwoPhaseStateLock, LW_EXCLUSIVE); MyLockedGxact->locking_backend = InvalidBackendId; diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 31091ba7f3..d169027689 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -3226,7 +3226,7 @@ static SetConstraintState SetConstraintStateAddItem(SetConstraintState state, * Gets the current query fdw tuplestore and initializes it if necessary */ static Tuplestorestate * -GetCurrentFDWTuplestore() +GetCurrentFDWTuplestore(void) { Tuplestorestate *ret; diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index efab4ca0df..a574cf365a 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -610,7 +610,7 @@ SnapBuildExportSnapshot(SnapBuild *builder) * owner back to its original value. */ void -SnapBuildClearExportedSnapshot() +SnapBuildClearExportedSnapshot(void) { /* nothing exported, thats the usual case */ if (!ExportInProgress) diff --git a/src/backend/replication/repl_scanner.l b/src/backend/replication/repl_scanner.l index 056cc14129..91bac21b06 100644 --- a/src/backend/replication/repl_scanner.l +++ b/src/backend/replication/repl_scanner.l @@ -237,7 +237,7 @@ replication_scanner_init(const char *str) } void -replication_scanner_finish() +replication_scanner_finish(void) { yy_delete_buffer(scanbufhandle); scanbufhandle = NULL; diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index e1bab079d5..27de156b1f 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -249,7 +249,7 @@ InitWalSender(void) * process, similar to what transaction abort does in a regular backend. */ void -WalSndErrorCleanup() +WalSndErrorCleanup(void) { LWLockReleaseAll(); diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index 0b10dac729..921f0292e3 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -1027,7 +1027,7 @@ dsm_impl_pin_segment(dsm_handle handle, void *impl_private) } static int -errcode_for_dynamic_shared_memory() +errcode_for_dynamic_shared_memory(void) { if (errno == EFBIG || errno == ENOMEM) return errcode(ERRCODE_OUT_OF_MEMORY); diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 2f0e9cda8c..074935ce38 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -345,7 +345,7 @@ GetNonHistoricCatalogSnapshot(Oid relid) * cycles we spent tracking such fine details would be well-spent. */ void -InvalidateCatalogSnapshot() +InvalidateCatalogSnapshot(void) { CatalogSnapshotStale = true; } diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index 72755b064d..b771a63317 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -703,7 +703,7 @@ PrintControlValues(bool guessed) * Print the values to be changed. */ static void -PrintNewControlValues() +PrintNewControlValues(void) { char fname[MAXFNAMELEN]; diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index ae0ba19814..296d17dbbb 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -2993,7 +2993,7 @@ plperl_hash_from_tuple(HeapTuple tuple, TupleDesc tupdesc) static void -check_spi_usage_allowed() +check_spi_usage_allowed(void) { /* see comment in plperl_fini() */ if (plperl_ending)