Skip to content

Commit 344bac8

Browse files
committed
ic_udpifc: fix initSndBufferPool forward declaration
The forward declaration at line 838 was static void initSndBufferPool(); which under C's old K&R rules means 'function with unspecified arguments' — but the actual definition takes a SendBufferPool *: static void initSndBufferPool(SendBufferPool *p) and the single caller at line 3677 passes &snd_buffer_pool. gcc silently accepts the mismatch; Apple clang correctly rejects it under -Wdeprecated-non-prototype. C2x will reject it on every compiler. Match the forward declaration to the definition.
1 parent e86bac6 commit 344bac8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

contrib/interconnect/udp/ic_udpifc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ static void sendOnce(ChunkTransportState *transportStates, ChunkTransportStateEn
835835
static inline uint64 computeExpirationPeriod(MotionConn *conn, uint32 retry);
836836

837837
static ICBuffer *getSndBuffer(MotionConn *conn);
838-
static void initSndBufferPool();
838+
static void initSndBufferPool(SendBufferPool *p);
839839

840840
static void putIntoUnackQueueRing(UnackQueueRing *uqr, ICBuffer *buf, uint64 expTime, uint64 now);
841841
static void initUnackQueueRing(UnackQueueRing *uqr);

0 commit comments

Comments
 (0)