From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6569D41A2B for ; Fri, 17 Mar 2023 15:02:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0399568C1E5; Fri, 17 Mar 2023 17:02:44 +0200 (EET) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A944D68C198 for ; Fri, 17 Mar 2023 17:02:37 +0200 (EET) Received: by mail-qt1-f173.google.com with SMTP id r16so5844314qtx.9 for ; Fri, 17 Mar 2023 08:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ltnglobal-com.20210112.gappssmtp.com; s=20210112; t=1679065356; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eB3QUOtYzHOtOttNDyuOMgkcn/tWlRQ7wEcXjvawcn8=; b=VxdCsaDgLNlgSwE6sgKGZ79A+VqhJMRV9D+rKggpPNsgXSgH0brfi878Kk1kARbffC Ym060dOX6WrdzyowGuqbZS5yKajsrWSsXz8nlprvmvz9gUd+bZ/L9cxu1WgwPn1yNpgr 09FwmCalZuQ8AEciCzPWuqHz/0/T5earpurPynE6X88l/PRCbmQnvhc7q9Q7sC1hZFxS aZubnb2fmDnS1j+uQYdC/EPx5LwsyI+CyEa5XAJaZMW7akR2ngw726A4HZyHqt8E7QCA hvdPQZEab6bsYFNl3owN99Dh9l5ZA8y5AbEPWz/HE1idbbJsr5mE/3DkE2HcHNIQsdXM vLXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679065356; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eB3QUOtYzHOtOttNDyuOMgkcn/tWlRQ7wEcXjvawcn8=; b=FrRQx3HcefPt5yEVknAZUfNziD/jglwgdn7ZyBzjIhudmC/sge2yyeEUCroupKrb31 W7RP6RqJjPMS3LIMn+HAiyenZR+DlnzBNFiir4dNAj3slUTlnHkeoUwvatxQsOyIIKFq VZ5ixapDvwQP7J0AFH02fyFTuKfIU4WiiNKbLgbRQ/xW4ZrXliQbb1mYqLfZX7rmktQ7 IjkjK0dTpWDFyVM0eVR8TUx4kZ9PM7NUdREi1JmEs75zk8WovyKpG+BLhhLcOjjMYBNh rvQJ66J9/8yUK5Kg0tjdPn96dOTxuA4OKxFTEplcXlFlqnxSeqO2ulN4qsgbvZHcJobZ QKaA== X-Gm-Message-State: AO0yUKWTWpxgfLBTrcp0XnzMjAEjaEHy/hCoL392KRRh8AW82zJ5vVme r4g8XUhdbvqaQo5pwmR5axaAayeOkL6xxGCAWVM= X-Google-Smtp-Source: AK7set/zqcQW8/TgVbdCP3D+85Yp74JcJpZ0ZqFwht3oApskj9V8/M+BInN4xpMDCzh9GP3RgFlxRg== X-Received: by 2002:ac8:5a0c:0:b0:3bf:e796:bfdd with SMTP id n12-20020ac85a0c000000b003bfe796bfddmr5977278qta.9.1679065356112; Fri, 17 Mar 2023 08:02:36 -0700 (PDT) Received: from klab-nyc-kernellabs2.localdomain (pool-71-105-132-214.nycmny.fios.verizon.net. [71.105.132.214]) by smtp.gmail.com with ESMTPSA id v127-20020a379385000000b007456c75edbbsm1768469qkd.129.2023.03.17.08.02.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2023 08:02:35 -0700 (PDT) From: Devin Heitmueller X-Google-Original-From: Devin Heitmueller To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 Mar 2023 11:02:31 -0400 Message-Id: <20230317150232.17804-1-dheitmueller@ltnglobal.com> X-Mailer: git-send-email 2.35.1.655.ga68dfadae5 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] avcodec: Fix warnings with signed/unsigned compare in bitstream.h 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 Cc: Devin Heitmueller Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: When including the header in decklink_enc.cpp it would be fed through the C++ compiler rather than the C compiler, which has more strict warnings when comparing signed/unsigned values. Make the local variables unsigned to match the arguments they are being passed for those functions. Signed-off-by: Devin Heitmueller --- libavcodec/bytestream.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index d0033f14f3..67080604b9 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -180,7 +180,7 @@ static av_always_inline void bytestream2_skipu(GetByteContext *g, static av_always_inline void bytestream2_skip_p(PutByteContext *p, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -268,7 +268,7 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size) { - int size2 = FFMIN(g->buffer_end - g->buffer, size); + unsigned int size2 = FFMIN(g->buffer_end - g->buffer, size); memcpy(dst, g->buffer, size2); g->buffer += size2; return size2; @@ -287,7 +287,7 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, const uint8_t *src, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -311,7 +311,7 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p, const uint8_t c, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -348,7 +348,7 @@ static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p, GetByteContext *g, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; -- 2.35.1.655.ga68dfadae5 _______________________________________________ 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".