From patchwork Mon Jan 6 15:21:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 17218 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 BA7F744B8B1 for ; Mon, 6 Jan 2020 17:21:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9FA1968A8F8; Mon, 6 Jan 2020 17:21:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E7296689EFB for ; Mon, 6 Jan 2020 17:21:20 +0200 (EET) Received: by mail-io1-f41.google.com with SMTP id z193so48935481iof.1 for ; Mon, 06 Jan 2020 07:21:20 -0800 (PST) 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=etd81b5nxxe461CkLKwCF39XghqX7shVs4PobcUIT/w=; b=nYFPuBju6XFR5e7/Jbtg4x8i/FvxYPOrG44lTB7cSZHYlsFKx3qgUMo7VJ1rSCWugS AN05oANzsYL0w2abnMufrmxJJ+SCFnEbodathHWtU3mNz4cHLlHhjmZOx3VnsM4SoYR2 IKx9UjVPe8OX4GNK/3/Pw+aesR60N2GePY/s2zE8D4gQGXcCfcKcmhaNRcVHb1VIDHJN KeyBktIbdnUQQ8wTLiB9uuNqwTb94b64VUvXYyH7t1+XYlXZ1ivjpMIm9RaUpRBcM1BM YFpaAihdDk1ELQgM5nn1Pa/ochGd0eI8Ciu5nvX8BEVsrCNQjpz8M+ET7YSqEuRfhnO+ zpoA== 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=etd81b5nxxe461CkLKwCF39XghqX7shVs4PobcUIT/w=; b=QiSlgG62oey/1SRbaugrvsl3FT5xaZFnIqhZY/c5TYDGdItEjSyv7wUdjHoG6+LuGE U/kabTluU9L07PAyBUE0CjL7tbmatDpi+6qswySdj5Sx+awK2SPp+nJUg3LHHNBN3i/M uvGehG64ohYNyqRuwTtYfqH4O+fEYmSO5HhR7dbqwBt8Mo1fssLnLhaVofZGWJEFJdK4 HswaxA6cBQ1cqggeKR3LWgiYrnOQBhOImlxDLhAHm/yvt+arXaEr502UF6YMuCt4qBI7 UCH63xkUzU7feCZDwi0GRsSHkH9DVENJ0MG4zAwo6VXH2YiesFb1L1iq7vHHEAV+Ormw OUAQ== X-Gm-Message-State: APjAAAWp5nNzXkP5SW8AxVOutqoWnRbxXzaFRo5aF0Ahq75XnISVueCD 0gCESIbuFy0bjMG6GS2ZGBEriXM/nIBX4p055KwRoA== X-Google-Smtp-Source: APXvYqyOzoeHQAWBDUhsTSpofBQ+kTO4j/C0PhpeFi1Z+aG1iIfpZakH8O6CL1YKCVx6YJ+szpNkMjQlAawnqQEF4R0= X-Received: by 2002:a5d:84d6:: with SMTP id z22mr65265097ior.54.1578324079662; Mon, 06 Jan 2020 07:21:19 -0800 (PST) MIME-Version: 1.0 From: Carl Eugen Hoyos Date: Mon, 6 Jan 2020 16:21:08 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]Silence an ugly 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 fixes several warnings when compiling with clang. Please comment, Carl Eugen From fa987cd315d432146e48f7d07832ff153eacb4bd Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 6 Jan 2020 16:16:18 +0100 Subject: [PATCH] Silence "string-plus-int" warning shown by clang. libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int] --- libavcodec/utils.c | 2 +- libavdevice/avdevice.c | 2 +- libavfilter/avfilter.c | 2 +- libavformat/utils.c | 2 +- libavutil/utils.c | 2 +- libpostproc/postprocess.c | 2 +- libswresample/swresample.c | 2 +- libswscale/utils.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index c935e07538..fd5565a5e8 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1444,7 +1444,7 @@ const char *avcodec_configuration(void) const char *avcodec_license(void) { #define LICENSE_PREFIX "libavcodec license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } int av_get_exact_bits_per_sample(enum AVCodecID codec_id) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 72e1b67887..3d03d89f04 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -75,7 +75,7 @@ const char * avdevice_configuration(void) const char * avdevice_license(void) { #define LICENSE_PREFIX "libavdevice license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } static void *device_next(void *prev, int output, diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index baafd029e9..394811916d 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -88,7 +88,7 @@ const char *avfilter_configuration(void) const char *avfilter_license(void) { #define LICENSE_PREFIX "libavfilter license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } void ff_command_queue_pop(AVFilterContext *filter) diff --git a/libavformat/utils.c b/libavformat/utils.c index b472762dd1..2470a6ac0e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -77,7 +77,7 @@ const char *avformat_configuration(void) const char *avformat_license(void) { #define LICENSE_PREFIX "libavformat license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } int ff_lock_avformat(void) diff --git a/libavutil/utils.c b/libavutil/utils.c index 230081ea47..c1cd452eee 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -70,7 +70,7 @@ const char *avutil_configuration(void) const char *avutil_license(void) { #define LICENSE_PREFIX "libavutil license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } const char *av_get_media_type_string(enum AVMediaType media_type) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 1fef8747c0..e16ef259ce 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -108,7 +108,7 @@ const char *postproc_configuration(void) const char *postproc_license(void) { #define LICENSE_PREFIX "libpostproc license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } #define GET_MODE_BUFFER_SIZE 500 diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 1ac5ef9a30..a7bb69dd4f 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -46,7 +46,7 @@ const char *swresample_configuration(void) const char *swresample_license(void) { #define LICENSE_PREFIX "libswresample license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){ diff --git a/libswscale/utils.c b/libswscale/utils.c index c915cf0fca..b2c08a5983 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -86,7 +86,7 @@ const char *swscale_configuration(void) const char *swscale_license(void) { #define LICENSE_PREFIX "libswscale license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; + return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } typedef struct FormatEntry { -- 2.23.0