From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 09E8B4DAA2 for ; Thu, 3 Jul 2025 17:54:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 663A068EC53; Thu, 3 Jul 2025 20:54:17 +0300 (EEST) Received: from btbn.de (btbn.de [144.76.60.213]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C15E168EADD for ; Thu, 3 Jul 2025 20:54:10 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id CF7F227FFCD35 for ; Thu, 03 Jul 2025 19:54:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1751565249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U7b5hgGOYn2oc2O9+YImXouQM34TpPfKUmPUipJnd04=; b=Gaf3q3TlBxNsXNchg+SWpv9yqKWos8hKMbanBrpoyDvs84bWCV2xZMM0qP5AhcuYOxotSv ITMXFA5YtSEZSxTev/V2kfjYR6BrVvKyWAArM2PbSveQ8iPUAYkWGgpsyyG/vWxUti68iM dMAX1VfOCNfIl2IsEZl9R3XGyOqh7c3q+qj7YGD9tYDjhMj60RihJ7NwLdL9tcKLVBwulb 1yvkAcL9gYAtbctKZGq1eHGDtHZfodMhkpmG9llySFOpufbzF6dNReG9amumt3GYYxkWjs zSDpIJf81s6if+Yd4gfRhuksf5Vhl8Wshx2b4QX46n6nc2GNnzj3YQK3lD5exQ== Message-ID: Date: Thu, 3 Jul 2025 19:54:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20250702165655.1325-1-timo@rothenpieler.org> <20250702165655.1325-6-timo@rothenpieler.org> Content-Language: en-US From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 05/18] avformat/whip: fix format string for printing size_t X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 03.07.2025 19:16, Andreas Rheinhardt wrote: > Timo Rothenpieler: >> --- >> libavformat/whip.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/libavformat/whip.c b/libavformat/whip.c >> index 7cd3f48ba9..71c667cd31 100644 >> --- a/libavformat/whip.c >> +++ b/libavformat/whip.c >> @@ -926,7 +926,7 @@ static int parse_answer(AVFormatContext *s) >> if (whip->state < WHIP_STATE_NEGOTIATED) >> whip->state = WHIP_STATE_NEGOTIATED; >> whip->whip_answer_time = av_gettime(); >> - av_log(whip, AV_LOG_VERBOSE, "SDP state=%d, offer=%luB, answer=%luB, ufrag=%s, pwd=%luB, transport=%s://%s:%d, elapsed=%dms\n", >> + av_log(whip, AV_LOG_VERBOSE, "SDP state=%d, offer=%zuB, answer=%zuB, ufrag=%s, pwd=%zuB, transport=%s://%s:%d, elapsed=%dms\n", >> whip->state, strlen(whip->sdp_offer), strlen(whip->sdp_answer), whip->ice_ufrag_remote, strlen(whip->ice_pwd_remote), >> whip->ice_protocol, whip->ice_host, whip->ice_port, ELAPSED(whip->whip_starttime, av_gettime())); >> >> @@ -977,7 +977,7 @@ static int ice_create_request(AVFormatContext *s, uint8_t *buf, int buf_size, in >> /* The username is the concatenation of the two ICE ufrag */ >> ret = snprintf(username, sizeof(username), "%s:%s", whip->ice_ufrag_remote, whip->ice_ufrag_local); >> if (ret <= 0 || ret >= sizeof(username)) { >> - av_log(whip, AV_LOG_ERROR, "Failed to build username %s:%s, max=%lu, ret=%d\n", >> + av_log(whip, AV_LOG_ERROR, "Failed to build username %s:%s, max=%zu, ret=%d\n", >> whip->ice_ufrag_remote, whip->ice_ufrag_local, sizeof(username), ret); >> ret = AVERROR(EIO); >> goto end; >> @@ -1420,7 +1420,7 @@ static int setup_srtp(AVFormatContext *s) >> if (whip->state < WHIP_STATE_SRTP_FINISHED) >> whip->state = WHIP_STATE_SRTP_FINISHED; >> whip->whip_srtp_time = av_gettime(); >> - av_log(whip, AV_LOG_VERBOSE, "SRTP setup done, state=%d, suite=%s, key=%luB, elapsed=%dms\n", >> + av_log(whip, AV_LOG_VERBOSE, "SRTP setup done, state=%d, suite=%s, key=%zuB, elapsed=%dms\n", >> whip->state, suite, sizeof(send_key), ELAPSED(whip->whip_starttime, av_gettime())); >> >> end: > > Why not SIZE_SPECIFIER? According to C99, %zu is the format specifier for size_t, so should work everywhere? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".