miniscule compiler barf in pg_ctl.c

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: miniscule compiler barf in pg_ctl.c
Date: 2004-07-21 18:36:47
Message-ID: 54798A299E68514AB7C4DEBA25F03BE101BBAA@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have seen this before with other compilers. The latest MINGW GCC
compiler does not like a goto label with no statements following.
pg_ctl.c: In function `pgwin32_ServiceMain':
pg_ctl.c:991: error: label at end of compound statement
make[3]: *** [pg_ctl.o] Error 1
make[3]: Leaving directory `/u/postgresql-snapshot/src/bin/pg_ctl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/u/postgresql-snapshot/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/u/postgresql-snapshot/src'
make: *** [all] Error 2

Fix is simple, add an empty statement:

switch (ret)
{
case WAIT_OBJECT_0: /* shutdown event */
kill(postmasterPID,SIGINT);
WaitForSingleObject(postmasterProcess,INFINITE);
break;

case (WAIT_OBJECT_0+1): /* postmaster went down */
break;

default:
; /* <<<<<<<<<< Just a semicolon added here <<<<<<<<<<<< */
/* assert(false); */
}

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Jürgen Schönig 2004-07-21 19:30:22 Re: parameter hints to the optimizer
Previous Message Dann Corbit 2004-07-21 18:14:52 Missing header in zic.c?