]> granicus.if.org Git - postgresql/commitdiff
Don't use function definitions looking like old-style ones.
authorAndres Freund <andres@anarazel.de>
Sat, 15 Aug 2015 15:25:00 +0000 (17:25 +0200)
committerAndres Freund <andres@anarazel.de>
Sat, 15 Aug 2015 15:25:00 +0000 (17:25 +0200)
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.

contrib/pg_standby/pg_standby.c
src/backend/access/transam/twophase.c
src/backend/commands/trigger.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/repl_scanner.l
src/backend/replication/walsender.c
src/backend/storage/ipc/dsm_impl.c
src/backend/utils/time/snapmgr.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/pl/plperl/plperl.c

index 861caea348106cfb1f4fb67d2325d27cd8d201fe..5eac2b1e49057409ea2e43c693f99fa951168b12 100644 (file)
@@ -171,7 +171,7 @@ CustomizableInitialize(void)
  *       Is the requested file ready yet?
  */
 static bool
-CustomizableNextWALFileReady()
+CustomizableNextWALFileReady(void)
 {
        if (stat(WALFilePath, &stat_buf) == 0)
        {
index 177d1e1432e386b7448243d52c9117cfec64f02c..d48d101340ffa48fa23901905420ce131aa73eb1 100644 (file)
@@ -295,7 +295,7 @@ AtAbort_Twophase(void)
  * PGXACT entry.
  */
 void
-PostPrepare_Twophase()
+PostPrepare_Twophase(void)
 {
        LWLockAcquire(TwoPhaseStateLock, LW_EXCLUSIVE);
        MyLockedGxact->locking_backend = InvalidBackendId;
index 31091ba7f3e2f54b4f6dbd91648223f442b99766..d169027689a2aa9c6942565c4c5c7ba87638f164 100644 (file)
@@ -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;
 
index efab4ca0df1af65b5d796b909f7cc646c6b23b7c..a574cf365a379a0e75bef00e1b9eecc8edbfbc55 100644 (file)
@@ -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)
index 056cc1412937bb0bc8011464d75b08498155c225..91bac21b06b5607403b086322ed9a52aeb5b5a02 100644 (file)
@@ -237,7 +237,7 @@ replication_scanner_init(const char *str)
 }
 
 void
-replication_scanner_finish()
+replication_scanner_finish(void)
 {
        yy_delete_buffer(scanbufhandle);
        scanbufhandle = NULL;
index e1bab079d5dbd02fae04b5d209ea51f1b2e5c986..27de156b1ffb7c6d4b7f64bb57a93a4f21428c3a 100644 (file)
@@ -249,7 +249,7 @@ InitWalSender(void)
  * process, similar to what transaction abort does in a regular backend.
  */
 void
-WalSndErrorCleanup()
+WalSndErrorCleanup(void)
 {
        LWLockReleaseAll();
 
index 0b10dac72900732df1f3e441c82ff171b76cf47a..921f0292e36cbc8aca31b69c5074a260059b66a0 100644 (file)
@@ -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);
index 2f0e9cda8c323753ca6099ea2322b0f8000eb3ff..074935ce381d2e0f2e8911491cdd6eca3230f455 100644 (file)
@@ -345,7 +345,7 @@ GetNonHistoricCatalogSnapshot(Oid relid)
  * cycles we spent tracking such fine details would be well-spent.
  */
 void
-InvalidateCatalogSnapshot()
+InvalidateCatalogSnapshot(void)
 {
        CatalogSnapshotStale = true;
 }
index 72755b064d51bf17a5bc71a14ff2d6ad172decfa..b771a63317911e3e69c52dab97fb93e623236a7a 100644 (file)
@@ -703,7 +703,7 @@ PrintControlValues(bool guessed)
  * Print the values to be changed.
  */
 static void
-PrintNewControlValues()
+PrintNewControlValues(void)
 {
        char            fname[MAXFNAMELEN];
 
index ae0ba19814fd03d75063495f32a06dae8a6cada5..296d17dbbb3ee592b2974392a03011c99c4e0e59 100644 (file)
@@ -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)