On 07/07/14 4:08 PM, Martin Storsjö wrote:
> This silences a warning with gcc.
> ---
> In my defense, clang didn't show this warning.
> ---
>  libavformat/mov.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 4a2d265..853c3e5 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -213,7 +213,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext 
> *pb, unsigned len)
>      char language[4] = { 0 };
>      char buf[100];
>      uint16_t langcode = 0;
> -    double longitude, latitude, altitude;
> +    double longitude, latitude, av_unused(altitude);
>      const char *key = "location";
>  
>      if (len < 4 + 2 + 1 + 1 + 4 + 4 + 4)

Why not just remove the variable altogether and do an avio_rb32() or 
avio_skip() after 
latitude? Assuming avio_rb32() is needed at all to increase the pb pointer, 
that is.

It would remove an unnecessary division.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to