Skip to content

Commit f383c14

Browse files
committed
fix compiler warnings
1 parent 7f9ebf1 commit f383c14

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

Diff for: src/bkb.c

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#define BIT_CHECK(mask, bit) (((mask) & ((nodemask_t)1 << (bit))) != 0)
55
#define BIT_SET(mask, bit) (mask |= ((nodemask_t)1 << (bit)))
6+
typedef uint64 nodemask_t;
67

78
/*
89
* Bron–Kerbosch algorithm to find maximum clique in graph

Diff for: src/include/bkb.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
#ifndef __BKB_H__
55
#define __BKB_H__
66

7-
#include "postgres.h" /* nodemask_t */
7+
#include "postgres.h"
88

9-
#define MAX_NODES sizeof(nodemask_t)
10-
typedef uint64 nodemask_t;
9+
#define MAX_NODES sizeof(uint64)
1110

12-
extern nodemask_t MtmFindMaxClique(nodemask_t* matrix, int n_modes, int* clique_size);
11+
extern uint64 MtmFindMaxClique(uint64* matrix, int n_modes, int* clique_size);
1312

1413
#endif

Diff for: src/multimaster.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,6 @@ mtm_init_node(PG_FUNCTION_ARGS)
903903

904904
for (i = 0; i < n_nodes; i++)
905905
{
906-
RepOriginId origin_id;
907906
char *origin_name;
908907
char *recovery_slot;
909908

@@ -912,7 +911,7 @@ mtm_init_node(PG_FUNCTION_ARGS)
912911

913912
/* create origin for this neighbour */
914913
origin_name = psprintf(MULTIMASTER_SLOT_PATTERN, i + 1);
915-
origin_id = replorigin_create(origin_name);
914+
replorigin_create(origin_name);
916915

917916
/* Create recovery slot to hold WAL files that we may need during recovery */
918917
recovery_slot = psprintf(MULTIMASTER_RECOVERY_SLOT_PATTERN, i + 1);

Diff for: src/state.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,6 @@ MtmMonitor(Datum arg)
10121012
for (i = 0; i < mtm_cfg->n_nodes; i++)
10131013
{
10141014
char *connstr_with_appname;
1015-
int destination_id;
10161015

10171016
if (i + 1 == Mtm->my_node_id)
10181017
continue;
@@ -1021,10 +1020,10 @@ MtmMonitor(Datum arg)
10211020
mtm_cfg->nodes[i].conninfo,
10221021
MULTIMASTER_BROADCAST_SERVICE);
10231022

1024-
destination_id = dmq_destination_add(connstr_with_appname,
1025-
psprintf("node%d", mtm_cfg->my_node_id),
1026-
psprintf("node%d", i + 1),
1027-
MtmHeartbeatSendTimeout);
1023+
dmq_destination_add(connstr_with_appname,
1024+
psprintf("node%d", mtm_cfg->my_node_id),
1025+
psprintf("node%d", i + 1),
1026+
MtmHeartbeatSendTimeout);
10281027

10291028
pfree(connstr_with_appname);
10301029
}

0 commit comments

Comments
 (0)