[vlc-devel] [PATCH 2/3] omxil: Avoid warnings about differences in signedness

Martin Storsjö martin at martin.st
Thu Sep 29 10:20:53 CEST 2011


For omxil, the nal size has already been parsed out elsewhere, so
we don't need it returned here.

This fixes this warning:
omxil.c:926: warning: pointer targets in passing argument 7 of 'convert_sps_pps' differ in signedness
h264_nal.h:22: note: expected 'uint32_t *' but argument is of type 'int *'
---
An alternative fix would be to skip the previous patch and just add
a local uint32_t variable to store the result in, which then just would
be ignored.

Yet another alternative would be to change i_nal_size_length in the
omxil module to uint32_t, but that causes a cascade of other new
warnings instead, about comparsion between signed and unsigned.

 modules/codec/omxil/omxil.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 803dd29..816140d 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -922,8 +922,7 @@ static int OpenGeneric( vlc_object_t *p_this, bool b_encode )
             p_header->nFilledLen = 0;
             convert_sps_pps( p_dec, p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra,
                              p_header->pBuffer, p_header->nAllocLen,
-                             (uint32_t*) &p_header->nFilledLen,
-                             &p_sys->i_nal_size_length );
+                             (uint32_t*) &p_header->nFilledLen, NULL );
         }
         else if(p_sys->in.b_direct)
         {
-- 
1.7.2.5




More information about the vlc-devel mailing list