diff --git a/configure.ac b/configure.ac index 5421df1d0a0..6c249064ec2 100644 --- a/configure.ac +++ b/configure.ac @@ -658,6 +658,11 @@ AM_PROG_AS AX_COMPILER_VENDOR +AC_MSG_CHECKING([for C compiler version]) +# Capture the output of the compiler version command +ac_cv_c_compiler_version=`${CC} --version 2>&1 | grep "Apple clang version" | head -n 1 | awk '{print $4}' | cut -d'.' -f1` +AC_MSG_RESULT([$ac_cv_c_compiler_version]) + AX_CC_FOR_BUILD CFLAGS="${_ts_saved_CFLAGS}" @@ -848,6 +853,9 @@ AS_IF([test "x${has_optimizer_flags}" = "xno"], ] ) +AS_IF([test "x$ac_cv_c_compiler_version" = "x17"], [NO_WARN_CAST_FUNCTION_TYPE_MISMATCH="-Wno-cast-function-type-mismatch"], [NO_WARN_CAST_FUNCTION_TYPE_MISMATCH=""]) +AC_SUBST([NO_WARN_CAST_FUNCTION_TYPE_MISMATCH]) + case $host_os_def in linux) AS_IF([test "x$ax_cv_c_compiler_vendor" = "xintel"], [ @@ -885,7 +893,7 @@ case $host_os_def in darwin) AS_IF([test "x$ax_cv_c_compiler_vendor" = "xclang"], [ - common_opt="-pipe -Wall -Wno-deprecated-declarations -Qunused-arguments -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter" + common_opt="-pipe -Wall -Wno-deprecated-declarations -Qunused-arguments -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-vla-extension $NO_WARN_CAST_FUNCTION_TYPE_MISMATCH" debug_opt="-g $common_opt" release_opt="-g $common_opt $optimizing_flags -fno-strict-aliasing" cxx_opt="-Wno-invalid-offsetof" diff --git a/include/tscore/ink_endian.h b/include/tscore/ink_endian.h index 539c8354124..337a0ba44a7 100644 --- a/include/tscore/ink_endian.h +++ b/include/tscore/ink_endian.h @@ -26,8 +26,10 @@ #include "tscore/ink_config.h" #ifdef HAVE_SYS_ENDIAN_H +#if !defined(darwin) #include #endif +#endif #ifdef HAVE_MACHINE_ENDIAN_H #include #endif diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc index 5c52a188d3d..17b7d9ad0cf 100644 --- a/iocore/net/QUICNetVConnection.cc +++ b/iocore/net/QUICNetVConnection.cc @@ -1654,7 +1654,6 @@ QUICNetVConnection::_packetize_frames(uint8_t *packet_buf, QUICEncryptionLevel l max_frame_size = std::min(max_frame_size, this->_maximum_stream_frame_data_size()); bool probing = false; - int frame_count = 0; size_t len = 0; Ptr first_block = make_ptr(new_IOBufferBlock()); Ptr last_block = first_block; @@ -1691,7 +1690,6 @@ QUICNetVConnection::_packetize_frames(uint8_t *packet_buf, QUICEncryptionLevel l break; } - ++frame_count; probing |= frame->is_probing_frame(); if (frame->is_flow_controlled()) { int ret = this->_remote_flow_controller->update(this->_stream_manager->total_offset_sent());