From patchwork Sat Apr 13 22:04:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 12730 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 1BB604485F7 for ; Sun, 14 Apr 2019 01:04:26 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E2A8D68A980; Sun, 14 Apr 2019 01:04:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it1-f181.google.com (mail-it1-f181.google.com [209.85.166.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1951568A90E for ; Sun, 14 Apr 2019 01:04:19 +0300 (EEST) Received: by mail-it1-f181.google.com with SMTP id z17so3429081itc.1 for ; Sat, 13 Apr 2019 15:04:19 -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=Qd96Po58b/tER0T7wwBqB49TbFx1VGFeZhGY2bKEJ0A=; b=KZJ7K12a2tZkSceeBkTPHWsOQ8VxFLBqfdw6OEnwqrq2iXJaZLu8X2ZFmqbKs9R0vG Ghbhov4CRtAB1wnsfoewL2+IMgYk1yghVlPfWdWIadkr50a54HfrpSV5cBwhqtRpDjDE hCAlUb3oKo5aB+LNfyt9dIB5oqF0yx1DDJ+sSF+KVdNEFVd1TmZUqhcDhXr9SUZSMJA7 Tao3p00gktpvDS/UL5WcZKtJdPlMQW/CMZAaMyvycMa38UsW11IuOzWXyTtGp2JYnRWz wl13Qmgx3INEVOEkvpUb8A8+SPuMH8TbsjAbvrws2EJjG8vuSkMnaI3Vuy9CJGdbLpLv Ln8Q== 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=Qd96Po58b/tER0T7wwBqB49TbFx1VGFeZhGY2bKEJ0A=; b=hPI8Jugqjfqm99gKbzNKippCmeYGCvE2PS3nosmz7O8ADybVgxPr/vWLh8+AzalBos du7nF+KPuIo49BELcWPwQtUr/u5yWslwuPZ9bsVuRZ8yTMNmgZdYRwHWR0BWBxO++xlh 4Sh+lu3vWQXv7NOaLPFYzCvre4KaoJ66PebGSxj0E4uHO03hs/wqWpcwWkLRFt8li854 U55tlqT6ZPS0ehp9iPGlM5J36PBMJkGjpxPhNMfUNoDQdmu5nXg7U2+iWvTHu+pcmPUC DCI0YW6ETqQ4JybN+6hk5ngE2OWN2xfAl1a156E3Hg2+j0+QHqlnl4vpG20ljvC7U/D/ ViNw== X-Gm-Message-State: APjAAAWABF4qo/kWit2CdEcmbCuT+8ltP/3v3YFHhoyY+Bv7jAhLwLc7 dFV2r7jk6y/vChcfLpZOtB6xLEKHAIMGsGosdrwDLQ== X-Google-Smtp-Source: APXvYqwLPFBuHxSX2a0P4+ajHC8uEIB0ip/7tNZ2xrlgriqhzKdMQRhezEcK66uKVFJ6GFODiewjRQqYKN0Cppyi6CI= X-Received: by 2002:a02:1a45:: with SMTP id 66mr45310626jai.124.1555193057461; Sat, 13 Apr 2019 15:04:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:5503:0:0:0:0:0 with HTTP; Sat, 13 Apr 2019 15:04:16 -0700 (PDT) From: Carl Eugen Hoyos Date: Sun, 14 Apr 2019 00:04:16 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavfi/fspp: Add a cast to silence a clang 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! Attached patch silences two warnings shown when compiling with clang: libavfilter/vf_fspp.h:51:42: warning: implicit conversion from 'int' to 'int16_t' (aka 'short') changes value from 44130 to -21406 Please comment, Carl Eugen From d731e523d9c5854183d20d37fe921f49fb048498 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 13 Apr 2019 23:05:44 +0200 Subject: [PATCH] lavfi/fspp: Add two casts to int16_t. Silences a warning with clang: warning: implicit conversion from 'int' to 'int16_t' (aka 'short') changes value from 44130 to -21406 --- libavfilter/vf_fspp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_fspp.h b/libavfilter/vf_fspp.h index 74a3447..e346439 100644 --- a/libavfilter/vf_fspp.h +++ b/libavfilter/vf_fspp.h @@ -31,7 +31,7 @@ #define DCTSIZE 8 #define DCTSIZE_S "8" -#define FIX(x,s) ((int) ((x) * (1 << s) + 0.5) & 0xffff) +#define FIX(x,s) ((int16_t)((x) * (1 << s) + 0.5) & (int16_t)0xffff) #define C64(x) ((uint64_t)((x) | (x) << 16)) <<32 | (uint64_t)(x) | (uint64_t)(x) << 16 #define FIX64(x,s) C64(FIX(x,s)) -- 1.7.10.4