compiler warning read_objtype_from_string()

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: compiler warning read_objtype_from_string()
Date: 2016-09-28 15:55:48
Message-ID: af08f995-bed9-5979-36af-c0dc6c3fb467@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm getting the following compiler warning (using nondefault
optimization options):

objectaddress.c: In function 'read_objtype_from_string':
objectaddress.c:2309:9: error: 'type' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
return type;

The comment for the function says

* Return ObjectType for the given object type as given by
* getObjectTypeDescription; if no valid ObjectType code exists, but it's a
* possible output type from getObjectTypeDescription, return -1.

But the claim that it can return -1 does not seem supported by the code.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2016-09-28 16:04:48 Re: Tuplesort merge pre-reading
Previous Message Mithun Cy 2016-09-28 15:55:26 Re: Cache Hash Index meta page.