Re: a2e35b53 added unused variable to ConversionCreate()

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: a2e35b53 added unused variable to ConversionCreate()
Date: 2015-03-05 20:24:54
Message-ID: 20150305202454.GV3291@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan wrote:
> I'm seeing this on a the master branch tip when building at -O2:
>
> pg_conversion.c: In function ‘ConversionCreate’:
> pg_conversion.c:53:6: error: variable ‘oid’ set but not used
> [-Werror=unused-but-set-variable]
> Oid oid;
> ^
> cc1: all warnings being treated as errors
>
> I think that commit a2e35b53 did this.

Obviously the commit did not introduce an unused variable, but instead
made another variable take its place as the function's return value. In
an assert-enabled build it was used by an assert, which is why I didn't
notice the problem. I removed the assert and the variable so this
should be fixed now.

Thanks for reporting.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-03-05 20:59:36 Re: MD5 authentication needs help
Previous Message Stephen Frost 2015-03-05 20:17:56 Re: MD5 authentication needs help