]> git.sesse.net Git - ffmpeg/commitdiff
Silence "string-plus-int" warning shown by clang.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Mon, 6 Jan 2020 15:16:18 +0000 (16:16 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Mon, 6 Jan 2020 21:38:56 +0000 (22:38 +0100)
libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]

libavcodec/utils.c
libavdevice/avdevice.c
libavfilter/avfilter.c
libavformat/utils.c
libavutil/utils.c
libpostproc/postprocess.c
libswresample/swresample.c
libswscale/utils.c

index c935e07538c48a26d878e5d8aea1b918ec8e5a69..fd5565a5e89118cfd93c4ee40a6cc7331bff9ca1 100644 (file)
@@ -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)
index 72e1b67887f9bc7d9e63822e17fa63a29e33d0d4..3d03d89f04891046ac628d620a544f612aa915f8 100644 (file)
@@ -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,
index baafd029e9ef28be55aa81f70d2e5e26749074d3..394811916df3673de7d60c0c535245d804e672de 100644 (file)
@@ -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)
index b472762dd12921baa3ce35a7252cb64889b524f1..2470a6ac0e900b869b01c72076de1fc245b72a21 100644 (file)
@@ -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)
index 230081ea475fb43ed305e7c1f39f6a16c90d8e27..c1cd452eee51de5f81dcc0eb7f25f453cf82173b 100644 (file)
@@ -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)
index 1fef8747c00eba084732776e2135ece91e46beac..e16ef259ce9cd2539c4e0ddc49fc10fab2f3a91a 100644 (file)
@@ -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
index 1ac5ef9a3092893d3b5651afe0adaf099b84052d..a7bb69dd4fd4af628d34738e5a541ca2269e2a28 100644 (file)
@@ -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){
index c915cf0fcaf2aefd1d76f52c54f8ee641082a94c..b2c08a5983d713da0808ad7edd8f27ae7a7ecc7c 100644 (file)
@@ -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 {