Use the keyword _Static_assert directly Use the keyword _Static_assert because clang-cl does not allow the convenience macro static_assert to be used in function scope. BUG=aomedia:2875 Change-Id: I6f48e66c16d444ad7ea0310e6fef6a6603148924
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c index 6e58ba5..0f05bc3 100644 --- a/av1/av1_cx_iface.c +++ b/av1/av1_cx_iface.c
@@ -2790,9 +2790,11 @@ char *err_string = ctx->cpi->common.error.detail; #if __STDC_VERSION__ >= 201112L - static_assert(sizeof(ctx->cpi->common.error.detail) >= ARG_ERR_MSG_MAX_LEN, - "The size of the err_msg buffer for arg_match_helper must be " - "at least ARG_ERR_MSG_MAX_LEN"); + // We use the keyword _Static_assert because clang-cl does not allow the + // convenience macro static_assert to be used in function scope. + _Static_assert(sizeof(ctx->cpi->common.error.detail) >= ARG_ERR_MSG_MAX_LEN, + "The size of the err_msg buffer for arg_match_helper must be " + "at least ARG_ERR_MSG_MAX_LEN"); #else assert(sizeof(ctx->cpi->common.error.detail) >= ARG_ERR_MSG_MAX_LEN); #endif