Commit b5763ced authored by Robert Haas's avatar Robert Haas

test_shm_mq: Fix checks for negative queue size.

Noted while addressing compiler warnings pointed out on pgsql-hackers.
parent d89746c7
...@@ -29,7 +29,7 @@ typedef struct ...@@ -29,7 +29,7 @@ typedef struct
BackgroundWorkerHandle *handle[FLEXIBLE_ARRAY_MEMBER]; BackgroundWorkerHandle *handle[FLEXIBLE_ARRAY_MEMBER];
} worker_state; } 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, dsm_segment **segp,
test_shm_mq_header **hdrp, test_shm_mq_header **hdrp,
shm_mq **outp, shm_mq **inp); shm_mq **outp, shm_mq **inp);
...@@ -45,7 +45,7 @@ static bool check_worker_status(worker_state *wstate); ...@@ -45,7 +45,7 @@ static bool check_worker_status(worker_state *wstate);
* for a test run. * for a test run.
*/ */
void 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) shm_mq_handle **output, shm_mq_handle **input)
{ {
dsm_segment *seg; dsm_segment *seg;
...@@ -86,7 +86,7 @@ test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp, ...@@ -86,7 +86,7 @@ test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp,
* the number of workers, plus one. * the number of workers, plus one.
*/ */
static void 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, dsm_segment **segp, test_shm_mq_header **hdrp,
shm_mq **outp, shm_mq **inp) shm_mq **outp, shm_mq **inp)
{ {
......
...@@ -35,7 +35,7 @@ typedef struct ...@@ -35,7 +35,7 @@ typedef struct
} test_shm_mq_header; } test_shm_mq_header;
/* Set up dynamic shared memory and background workers for test run. */ /* 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, dsm_segment **seg, shm_mq_handle **output,
shm_mq_handle **input); shm_mq_handle **input);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment