diff mbox

[FFmpeg-devel] lavfi/frei0r: Fix union and remove unneeded cast

Message ID CAB0OVGq4J9kh4415DLUCMRJxLu3Y4ok9wsvJOeRR3+_TqmWZ5A@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos April 23, 2019, 9:11 p.m. UTC
Hi!

I failed to test attached patch but it seems like a more useful fix for
the following (past) warning:
libavfilter/vf_frei0r.c:130:17: warning: assignment to ‘char **’ from
incompatible pointer type ‘char *’

Please comment, Carl Eugen

Comments

mypopy@gmail.com April 24, 2019, 1:36 a.m. UTC | #1
On Wed, Apr 24, 2019 at 5:12 AM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>
> Hi!
>
> I failed to test attached patch but it seems like a more useful fix for
> the following (past) warning:
> libavfilter/vf_frei0r.c:130:17: warning: assignment to ‘char **’ from
> incompatible pointer type ‘char *’
>
> Please comment, Carl Eugen

LGTM, looks like I given a wrong type casting in this case.
Paul B Mahol April 24, 2019, 8:27 p.m. UTC | #2
On 4/23/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> Hi!
>
> I failed to test attached patch but it seems like a more useful fix for
> the following (past) warning:
> libavfilter/vf_frei0r.c:130:17: warning: assignment to ‘char **’ from
> incompatible pointer type ‘char *’
>
> Please comment, Carl Eugen
>

LGTM
Carl Eugen Hoyos April 24, 2019, 10:30 p.m. UTC | #3
2019-04-24 22:27 GMT+02:00, Paul B Mahol <onemda@gmail.com>:
> On 4/23/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>> Hi!
>>
>> I failed to test attached patch but it seems like a more useful fix for
>> the following (past) warning:
>> libavfilter/vf_frei0r.c:130:17: warning: assignment to ‘char **’ from
>> incompatible pointer type ‘char *’
>>
>> Please comment, Carl Eugen
>>
>
> LGTM

Patch applied.

Thank you all, Carl Eugen
diff mbox

Patch

From c0d6001012f3da95ee493905c7411dc20839f4c8 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Tue, 23 Apr 2019 23:09:01 +0200
Subject: [PATCH] lavfi/frei0r: Fix a union entry and remove an unneeded cast.

---
 libavfilter/vf_frei0r.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 165fbd7..5d38405 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -93,7 +93,7 @@  static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha
         double d;
         f0r_param_color_t col;
         f0r_param_position_t pos;
-        f0r_param_string *str;
+        f0r_param_string str;
     } val;
     char *tail;
     uint8_t rgba[4];
@@ -127,7 +127,7 @@  static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha
         break;
 
     case F0R_PARAM_STRING:
-        val.str = (f0r_param_string *)param;
+        val.str = param;
         break;
     }
 
-- 
1.7.10.4