Skip to content

Commit

Permalink
Define the static on function level before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
rpluem-vf authored and edenhill committed Oct 10, 2022
1 parent 106d70a commit 96723aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ static void dr_msg_cb (rd_kafka_t *rk, const rd_kafka_message_t *rkmessage,
void *opaque) {
int32_t broker_id = -1;
struct buf *b = rkmessage->_private;
#if RD_KAFKA_VERSION < 0x01000000
static int say_once = 1;
#endif

if (b)
buf_destroy(b);
Expand All @@ -166,7 +169,6 @@ static void dr_msg_cb (rd_kafka_t *rk, const rd_kafka_message_t *rkmessage,

#if RD_KAFKA_VERSION < 0x01000000
if (rkmessage->offset == 0 && say_once) {
static int say_once = 1;
KC_INFO(3, "Enable message offset reporting "
"with '-X topic.produce.offset.report=true'\n");
say_once = 0;
Expand Down

0 comments on commit 96723aa

Please sign in to comment.