diff mbox

[FFmpeg-devel] lavf/mov: Make auxiliary_offsets consistently size_t.

Message ID CAB0OVGrRqG4EQ5ZGjOfF88urkWzKPtRL2FKY=M-wyJ=Vv5VRWQ@mail.gmail.com
State Superseded
Headers show

Commit Message

Carl Eugen Hoyos July 21, 2018, 1:52 p.m. UTC
Hi!

Attached patch fixes a warning on ppc32:
libavformat/mov.c: In function ‘mov_read_saio’:
libavformat/mov.c:6207:45: warning: assignment from incompatible
pointer type [-Wincompatible-pointer-types]
         encryption_index->auxiliary_offsets = auxiliary_offsets;
                                             ^

Please comment, Carl Eugen

Comments

Michael Niedermayer July 21, 2018, 8:43 p.m. UTC | #1
On Sat, Jul 21, 2018 at 03:52:19PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes a warning on ppc32:
> libavformat/mov.c: In function ‘mov_read_saio’:
> libavformat/mov.c:6207:45: warning: assignment from incompatible
> pointer type [-Wincompatible-pointer-types]
>          encryption_index->auxiliary_offsets = auxiliary_offsets;
>                                              ^
> 
> Please comment, Carl Eugen

This array is used to store 64bit values if version > 0, size_t may be 
smaller, is that intended ?

[...]
diff mbox

Patch

From dd861ac4c0fd18fab88de91a5b91b2114bb4fd89 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sat, 21 Jul 2018 15:47:02 +0200
Subject: [PATCH] lavf/mov: Make auxiliary_offsets consistently size_t.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes a compilation warning if size_t != uint64_t:
libavformat/mov.c: In function ‘mov_read_saio’:
libavformat/mov.c:6207:45: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
         encryption_index->auxiliary_offsets = auxiliary_offsets;
                                             ^
---
 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 870c603..061cad0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6138,7 +6138,7 @@  static int mov_read_saiz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
 static int mov_read_saio(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
-    uint64_t *auxiliary_offsets;
+    size_t *auxiliary_offsets;
     MOVEncryptionIndex *encryption_index;
     MOVStreamContext *sc;
     int i, ret;
-- 
1.7.10.4