From 03974ff302049c9ffe81e1c251f3e497e14ca441 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Sun, 8 Dec 2024 09:29:16 +0800 Subject: [PATCH] explicit cast for fast_mblock_alloc_object --- make.sh | 1 + src/sf_binlog_writer.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 153c281..f966463 100755 --- a/make.sh +++ b/make.sh @@ -132,6 +132,7 @@ fi cd .. cp Makefile.in Makefile +sed_replace "s#\\\$(CC)#gcc#g" Makefile sed_replace "s#\\\$(CFLAGS)#$CFLAGS#g" Makefile sed_replace "s#\\\$(LIBS)#$LIBS#g" Makefile sed_replace "s#\\\$(TARGET_PREFIX)#$TARGET_PREFIX#g" Makefile diff --git a/src/sf_binlog_writer.h b/src/sf_binlog_writer.h index fed5d8f..0e09bca 100644 --- a/src/sf_binlog_writer.h +++ b/src/sf_binlog_writer.h @@ -276,7 +276,9 @@ static inline SFBinlogWriterBuffer *sf_binlog_writer_alloc_buffer( { SFBinlogWriterBuffer *buffer; - if ((buffer=fast_mblock_alloc_object(&thread->mblock)) != NULL) { + if ((buffer=(SFBinlogWriterBuffer *)fast_mblock_alloc_object( + &thread->mblock)) != NULL) + { buffer->type = SF_BINLOG_BUFFER_TYPE_WRITE_TO_FILE; } return buffer;