From patchwork Sun Apr 15 22:19:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 8457 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.85 with SMTP id c82csp189975jad; Sun, 15 Apr 2018 15:19:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+CD9emv9DFl/YAWcPK1OWoVueXmahuKkCCNvwQVgyzhjkXLj6ANjgbpcmiZa99z5HHYXdg X-Received: by 10.28.142.1 with SMTP id q1mr9411226wmd.0.1523830762339; Sun, 15 Apr 2018 15:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523830762; cv=none; d=google.com; s=arc-20160816; b=bpLAS2Gc88QYqTm7PrTwT7NT8X79Ml2GslqLagP1+bxfzzkzGVue/bXObg/QaWR3cn qobK9rsLou2pCIkgtDRPFpfLa/yt3CxRJ6IUuN0UCmuTnrc5YrZoU1ES2bXuKXpEcqAT WQUvAwZuCrZh9H2ulVIep2aLnfjbvQ51sRPhw/pXuZQEzdhBigMs+cA/BgznIQW/mHK1 irNLfbmMMR8BMJ6tgs1mE+jqWbPlEFsgPlSgUyM4Yv0kpSPcNijnFE1F7umsu+D8Xs/K tZWBUtPq9Eipz4Qyk1JrpAnVCGn0+1F+xrT7oeAx/dgTHm8teJNdaaPt3la8zjZUQCdL cYBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=EzwPNkzkVlOXg36Bo2eC3E2TPa8rnnkK9RBw0U7ub0A=; b=Bnzy6JoLdM1/cETOdHmuvr3F8PAqD+BXXO2nOddA45YTqUq7atREVaGgiDxn8bCy3e wOiiaJpBd9J9TP0u/4bNZbo3ERJOSLWJxM31s65RzWw9jOAtoJnlZ4jJAaTZ8cp427r9 pYD6RJ2WaCrcycD4TXZnivUn5l5iVRi46n4R94kkbyteA6YZoc1DjQBgqKo2u7fnHNkc y4ubH2jrEwFpYzVVN/1fAu5FYwRfGl2KRqHNHXDDny8E7fPXrR1u6vZohtqTTDCubKTN h9RSCqRRn4+H8p8NxAg2HyzLVxlriAaxspUtSStWFBuurEwa9NHmDHus0CKSzzBqxXAu +BZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=aVmqyqiH; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m134si5175596wmg.190.2018.04.15.15.19.21; Sun, 15 Apr 2018 15:19:22 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=aVmqyqiH; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9A76D689C27; Mon, 16 Apr 2018 01:18:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A264689940 for ; Mon, 16 Apr 2018 01:18:48 +0300 (EEST) Received: by mail-io0-f169.google.com with SMTP id y128so15896104iod.4 for ; Sun, 15 Apr 2018 15:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jQe8tsnvZ7WQN4v322lUXjckfjksLHXYxZw3kkY2XQM=; b=aVmqyqiHmjapGIdDZ1CcuT+evO/397hQBD26PPinmlVgNent338BOHVzNlTIMCmlir jESh2q1foKIt6tKMSTcnYeIya7dM9qTMq5nC8QQhWw7Qm89Y4LIETjVCnNDIbF8k5gk2 r4tFHYjOfqAqv0AxnAaAR2soAo6kLjoh7lCTbB0Zlf5EKZr4tvUpe94Ll0/+tzDlNp7K cEzLrRQAdM7uLmCEiXxq1nhnq3PhwoL1Mq9+MbFBGQd669mDjXZ/cilITcXwO6jbXCOU M4Y6tDQjOGUROe3klDRW64moattNy3hKRL0AoBgPAwXu3fpZ+IuxbA5iAaPSmIVzMowI kbXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jQe8tsnvZ7WQN4v322lUXjckfjksLHXYxZw3kkY2XQM=; b=ClDg/bTQb715Ozeh6CG06/msAKaVo34dTKaoQgZUqqT9MhU70p6bB2Y8DhY5SzrBgk 15QvTP4C/aVJ+VYGE+XUyuuhAqfF82BXGJlLEu2GIWYVudZNzGBq/jPW6nqQK9z+VCm4 G+ffGKX4QxJb8BsXKNHIdxzrNds12WWiigSJ0JpLfGNqMJ1/ggD2plELkw/B+34a+15W AHyDzkYNm5Wrs3/HZl9LuChvutuTGvHQQd1kgAfTi9lnudFruNoHJuQvwBehJJ7DDLFQ gmOaTorXj+fLfRN6m/VLaZ2K3x4YrmtuGecuFyLrvRWYOMwZKqPkEp1p3zI9mkjaNyIV 2L+w== X-Gm-Message-State: ALQs6tBV3VxWq06y86ch74VZtFF5AGOo/xfsHitFHcSrXMxn8xeEBOEV XjZLz4O/SfNCwrbBDc5/hDM1k3x1LVwgrn+hex0= X-Received: by 10.107.161.199 with SMTP id k190mr15874125ioe.60.1523830752936; Sun, 15 Apr 2018 15:19:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.3.78 with HTTP; Sun, 15 Apr 2018 15:19:12 -0700 (PDT) From: Carl Eugen Hoyos Date: Mon, 16 Apr 2018 00:19:12 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavf/rtmpcrypt: Add a cast to silence a warning X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! rtmpe_write() exploits knowledge about av_rc4_crypt() internals and passes the same pointer as src and dst. I assume this is intentional for performance reasons, the only way to silence the resulting warning is a cast afaict. Please comment, Carl Eugen From 397b209506beb6c5a2acbe19bba98393216f1d0c Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 16 Apr 2018 00:14:24 +0200 Subject: [PATCH] lavf/rtmpcrypt: Add a cast to silence an unavoidable warning. Silences the following warning: libavformat/rtmpcrypt.c:304:36: warning: passing argument 2 of 'av_rc4_crypt' discards 'const' qualifier from pointer target type --- libavformat/rtmpcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtmpcrypt.c b/libavformat/rtmpcrypt.c index c41ae43..253b8ca 100644 --- a/libavformat/rtmpcrypt.c +++ b/libavformat/rtmpcrypt.c @@ -301,7 +301,7 @@ static int rtmpe_write(URLContext *h, const uint8_t *buf, int size) if (rt->handshaked) { /* encrypt data to send to the server */ - av_rc4_crypt(&rt->key_out, buf, buf, size, NULL, 1); + av_rc4_crypt(&rt->key_out, (uint8_t *)buf, buf, size, NULL, 1); } if ((ret = ffurl_write(rt->stream, buf, size)) < 0) -- 1.7.10.4