Re: Portability issues in shm_mq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Portability issues in shm_mq
Date
Msg-id 14103.1395163006@sss.pgh.pa.us
Whole thread Raw
In response to Re: Portability issues in shm_mq  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Portability issues in shm_mq  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
I wrote:
> Early returns not good:

Also, these compiler messages are probably relevant:

ccache gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I. -I.
-I../../src/include-D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/et  -c -o test.o test.c
 
test.c: In function 'test_shm_mq':
test.c:89:3: warning: passing argument 2 of 'shm_mq_receive' from incompatible pointer type [enabled by default]
In file included from test_shm_mq.h:18:0,                from test.c:19:
../../src/include/storage/shm_mq.h:61:22: note: expected 'Size *' but argument is of type 'uint64 *'
test.c: In function 'test_shm_mq_pipelined':
test.c:198:4: warning: passing argument 2 of 'shm_mq_receive' from incompatible pointer type [enabled by default]
In file included from test_shm_mq.h:18:0,                from test.c:19:
../../src/include/storage/shm_mq.h:61:22: note: expected 'Size *' but argument is of type 'uint64 *'
ccache gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I. -I.
-I../../src/include-D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/et  -c -o setup.o setup.c
 
ccache gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I. -I.
-I../../src/include-D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/et  -c -o worker.o worker.c
 
worker.c: In function 'copy_messages':
worker.c:193:3: warning: passing argument 2 of 'shm_mq_receive' from incompatible pointer type [enabled by default]
In file included from worker.c:25:0:
../../src/include/storage/shm_mq.h:61:22: note: expected 'Size *' but argument is of type 'uint64 *'

I'm thinking maybe you just forgot to update the contrib module.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: GSoC proposal. Index-only scans for GIST
Next
From: Robert Haas
Date:
Subject: Re: Portability issues in shm_mq