From b5763cedde2541a6629f64cccf77e37b21348714 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 15 Jan 2014 10:50:00 -0500 Subject: [PATCH] test_shm_mq: Fix checks for negative queue size. Noted while addressing compiler warnings pointed out on pgsql-hackers. --- contrib/test_shm_mq/setup.c | 6 +++--- contrib/test_shm_mq/test_shm_mq.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/test_shm_mq/setup.c b/contrib/test_shm_mq/setup.c index b34d4b3eab..e50f1f0013 100644 --- a/contrib/test_shm_mq/setup.c +++ b/contrib/test_shm_mq/setup.c @@ -29,7 +29,7 @@ typedef struct BackgroundWorkerHandle *handle[FLEXIBLE_ARRAY_MEMBER]; } worker_state; -static void setup_dynamic_shared_memory(uint64 queue_size, int nworkers, +static void setup_dynamic_shared_memory(int64 queue_size, int nworkers, dsm_segment **segp, test_shm_mq_header **hdrp, shm_mq **outp, shm_mq **inp); @@ -45,7 +45,7 @@ static bool check_worker_status(worker_state *wstate); * for a test run. */ void -test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp, +test_shm_mq_setup(int64 queue_size, int32 nworkers, dsm_segment **segp, shm_mq_handle **output, shm_mq_handle **input) { dsm_segment *seg; @@ -86,7 +86,7 @@ test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp, * the number of workers, plus one. */ static void -setup_dynamic_shared_memory(uint64 queue_size, int nworkers, +setup_dynamic_shared_memory(int64 queue_size, int nworkers, dsm_segment **segp, test_shm_mq_header **hdrp, shm_mq **outp, shm_mq **inp) { diff --git a/contrib/test_shm_mq/test_shm_mq.h b/contrib/test_shm_mq/test_shm_mq.h index 5f87da7b6d..5e0ee9ba43 100644 --- a/contrib/test_shm_mq/test_shm_mq.h +++ b/contrib/test_shm_mq/test_shm_mq.h @@ -35,7 +35,7 @@ typedef struct } test_shm_mq_header; /* Set up dynamic shared memory and background workers for test run. */ -extern void test_shm_mq_setup(uint64 queue_size, int32 nworkers, +extern void test_shm_mq_setup(int64 queue_size, int32 nworkers, dsm_segment **seg, shm_mq_handle **output, shm_mq_handle **input); -- 2.40.0