Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ic uninitialized warning in release build #121

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contrib/interconnect/ic_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ SendTupleChunkToAMS(ChunkTransportState * transportStates,
int i,
recount = 0;
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;
TupleChunkListItem currItem;

if (!transportStates)
Expand Down Expand Up @@ -131,7 +131,7 @@ GetTransportDirectBuffer(ChunkTransportState * transportStates,
struct directTransportBuffer *b)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;

if (!transportStates)
{
Expand Down Expand Up @@ -190,7 +190,7 @@ PutTransportDirectBuffer(ChunkTransportState * transportStates,
int16 targetRoute, int length)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;

if (!transportStates)
{
Expand Down Expand Up @@ -248,7 +248,7 @@ createChunkTransportState(ChunkTransportState * transportStates,
int numConns,
size_t chunk_trans_state_entry_size)
{
ChunkTransportStateEntry *pEntry;
ChunkTransportStateEntry *pEntry = NULL;
int motNodeID;
int i;

Expand Down
2 changes: 1 addition & 1 deletion contrib/interconnect/ic_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ extern ChunkTransportStateEntry *removeChunkTransportState(ChunkTransportState *
*/
#define doBroadcast(transportStates, pChunkEntry, tcItem, inactiveCountPtr) \
do { \
MotionConn *conn; \
MotionConn *conn = NULL; \
int *p_inactive = inactiveCountPtr; \
int i, index, inactive = 0; \
/* add our tcItem to each of the outgoing buffers. */ \
Expand Down
30 changes: 15 additions & 15 deletions contrib/interconnect/tcp/ic_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ startOutgoingConnections(ChunkTransportState * transportStates,
ExecSlice * sendSlice,
int *pOutgoingCount)
{
ChunkTransportStateEntry *pEntry;
MotionConn *conn;
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn = NULL;
ListCell *cell;
ExecSlice *recvSlice;
CdbProcess *cdbProc;
Expand Down Expand Up @@ -905,7 +905,7 @@ readRegisterMessage(ChunkTransportState * transportStates,
int iconn;
RegisterMessage *regMsg;
RegisterMessage msg;
MotionConn *newConn;
MotionConn *newConn = NULL;
ChunkTransportStateEntry *pChunkEntry = NULL;
ChunkTransportStateEntryTCP *pEntry = NULL;
CdbProcess *cdbproc = NULL;
Expand Down Expand Up @@ -1144,7 +1144,7 @@ acceptIncomingConnection(void)
{
int newsockfd;
socklen_t addrsize;
MotionConn *conn;
MotionConn *conn = NULL;
struct sockaddr_storage remoteAddr;
struct sockaddr_storage localAddr;
MotionConnTCP *tcp_conn = NULL;
Expand Down Expand Up @@ -1264,8 +1264,8 @@ SetupTCPInterconnect(EState *estate)
ListCell *cell;
ExecSlice *mySlice;
ExecSlice *aSlice;
MotionConn *conn;
MotionConnTCP *tcp_conn;
MotionConn *conn = NULL;
MotionConnTCP *tcp_conn = NULL;
SliceTable *sliceTable = estate->es_sliceTable;
int incoming_count = 0;
int outgoing_count = 0;
Expand Down Expand Up @@ -1944,7 +1944,7 @@ TeardownTCPInterconnect(ChunkTransportState * transportStates, bool hasErrors)
ChunkTransportStateEntry *pEntry = NULL;
int i;
ExecSlice *mySlice;
MotionConn *conn;
MotionConn *conn = NULL;

if (transportStates == NULL || transportStates->sliceTable == NULL)
{
Expand Down Expand Up @@ -2207,8 +2207,8 @@ void
dumpEntryConnections(int elevel, ChunkTransportStateEntry * pEntry)
{
int i;
MotionConn *mConn;
MotionConnTCP *conn;
MotionConn *mConn = NULL;
MotionConnTCP *conn = NULL;

for (i = 0; i < pEntry->numConns; i++)
{
Expand Down Expand Up @@ -2401,7 +2401,7 @@ flushInterconnectListenerBacklog(void)
static void
waitOnOutbound(ChunkTransportStateEntry * pEntry)
{
MotionConn *conn;
MotionConn *conn = NULL;

struct timeval timeout;
mpp_fd_set waitset,
Expand Down Expand Up @@ -2513,7 +2513,7 @@ DeregisterReadInterestTCP(ChunkTransportState * transportStates,
const char *reason)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;

if (!transportStates)
{
Expand Down Expand Up @@ -2556,7 +2556,7 @@ void
SendStopMessageTCP(ChunkTransportState * transportStates, int16 motNodeID)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;
int i;
char m = 'S';
ssize_t written;
Expand Down Expand Up @@ -2740,7 +2740,7 @@ RecvTupleChunkFromTCP(ChunkTransportState * transportStates,
int16 srcRoute)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;

/* check em' */
ML_CHECK_FOR_INTERRUPTS(transportStates->teardownActive);
Expand All @@ -2763,7 +2763,7 @@ RecvTupleChunkFromAnyTCP(ChunkTransportState * transportStates,
ChunkTransportStateEntry *pChunkEntry = NULL;
ChunkTransportStateEntryTCP *pEntry = NULL;
TupleChunkListItem tcItem;
MotionConn *conn;
MotionConn *conn = NULL;
mpp_fd_set rset;
int n,
i,
Expand Down Expand Up @@ -2944,7 +2944,7 @@ SendEOSTCP(ChunkTransportState * transportStates,
TupleChunkListItem tcItem)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;
int i;

if (!transportStates)
Expand Down
20 changes: 10 additions & 10 deletions contrib/interconnect/udp/ic_udpifc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2671,8 +2671,8 @@ startOutgoingUDPConnections(ChunkTransportState *transportStates,
{
ChunkTransportStateEntry *pChunkEntry;
ChunkTransportStateEntryUDP *pEntry;
MotionConn *mConn;
MotionConnUDP *conn;
MotionConn *mConn = NULL;
MotionConnUDP *conn = NULL;
ListCell *cell;
ExecSlice *recvSlice;
CdbProcess *cdbProc;
Expand Down Expand Up @@ -3317,7 +3317,7 @@ SetupUDPIFCInterconnect(EState *estate)
for (int i = 0; i < ht->size; i++)
{
struct ConnHtabBin *trash;
MotionConn *conn;
MotionConn *conn = NULL;

trash = ht->table[i];
while (trash != NULL)
Expand Down Expand Up @@ -3457,7 +3457,7 @@ TeardownUDPIFCInterconnect_Internal(ChunkTransportState *transportStates,
ChunkTransportStateEntry *pEntry = NULL;
int i;
ExecSlice *mySlice;
MotionConn *mConn;
MotionConn *mConn = NULL;
MotionConnUDP *conn = NULL;

uint64 maxRtt = 0;
Expand Down Expand Up @@ -4334,7 +4334,7 @@ DeregisterReadInterestUDP(ChunkTransportState *transportStates,
const char *reason)
{
ChunkTransportStateEntry *pEntry = NULL;
MotionConn *conn;
MotionConn *conn = NULL;

if (!transportStates)
{
Expand Down Expand Up @@ -5872,7 +5872,7 @@ SendEOSUDPIFC(ChunkTransportState *transportStates,
{
ChunkTransportStateEntry *pChunkEntry = NULL;
ChunkTransportStateEntryUDP *pEntry = NULL;
MotionConn *mConn;
MotionConn *mConn = NULL;
MotionConnUDP *conn = NULL;
int i = 0;
int retry = 0;
Expand Down Expand Up @@ -6922,8 +6922,8 @@ handleMismatch(icpkthdr *pkt, struct sockaddr_storage *peer, int peer_len)
static bool
cacheFuturePacket(icpkthdr *pkt, struct sockaddr_storage *peer, int peer_len)
{
MotionConn *mConn;
MotionConnUDP *conn;
MotionConn *mConn = NULL;
MotionConnUDP *conn = NULL;

mConn = findConnByHeader(&ic_control_info.startupCacheHtab, pkt);

Expand Down Expand Up @@ -7125,8 +7125,8 @@ dumpConnections(ChunkTransportStateEntry *pEntry, const char *fname)
{
int i,
j;
MotionConn *mConn;
MotionConnUDP *conn;
MotionConn *mConn = NULL;
MotionConnUDP *conn = NULL;

FILE *ofile = fopen(fname, "w+");

Expand Down