[HACKERS] Re: [COMMITTERS] pgsql: Modify tqueue infrastructure to support transient record types.

2015-11-09 Thread Robert Haas
On Mon, Nov 9, 2015 at 4:06 AM, Amit Kapila  wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Robert Haas  wrote:
>> Modify tqueue infrastructure to support transient record types.
>
> I am getting below compiler warning on Windows:
> tqueue.c(662): warning C4715: 'TupleQueueRemap' : not all control paths
> return a value

Well, that sucks.  Apparently, your Windows compiler thinks
elog(ERROR, ...) might return.  Apparently
b853eb97182079dcd30b4f52576bd5d6c275ee71 wasn't good enough for your
compiler; I wonder why not.

> Attached patch fixes the problem.

I don't want to do that, because adding a default: case to the switch
will prevent the compiler from complaining if somebody introduces
another enum value in the future.  Instead, we can just add a dummy
return at the end of the function.  I'll go do that.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Re: [COMMITTERS] pgsql: Modify tqueue infrastructure to support transient record types.

2015-11-07 Thread Kevin Grittner
On Friday, November 6, 2015 3:59 PM, Robert Haas  wrote:

> Modified Files
> --

> src/backend/executor/tqueue.c|  983 -

This patch created some referenced local variables:

tqueue.c: In function ‘tqueueReceiveSlot’:
tqueue.c:124:18: error: variable ‘tup’ set but not used 
[-Werror=unused-but-set-variable]
  HeapTupleHeader tup;
   ^
tqueue.c: In function ‘TupleQueueRemapTuple’:
tqueue.c:612:8: error: variable ‘dirty’ set but not used 
[-Werror=unused-but-set-variable]
  bool  dirty = false;
   ^
cc1: all warnings being treated as errors

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers