On 2018-Nov-09, Michael Paquier wrote:

> On Thu, Nov 08, 2018 at 12:13:31PM -0300, Alvaro Herrera wrote:

> > Right, that too.  Fortunately I think compilers warn about
> > mismatching indentation nowadays, at least in some cases.
> 
> I don't recall seeing a compiler warning about that, but I do recall
> coverity complaining loudly about such things.

:-)

/pgsql/source/master/src/backend/catalog/namespace.c: In function 
'InitRemoveTempRelations':
/pgsql/source/master/src/backend/catalog/namespace.c:4132:2: warning: this 'if' 
clause does not guard... [-Wmisleading-indentation]
  if (OidIsValid(namespaceOid))
  ^~
/pgsql/source/master/src/backend/catalog/namespace.c:4134:3: note: ...this 
statement, but the latter is misleadingly indented as if it is guarded by the 
'if'
   get_namespace_oid(namespaceName, true);
   ^~~~~~~~~~~~~~~~~

$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to