[MPlayer-dev-eng] [PATCH] add missing include headers

Reinhard Tartler siretart at tauware.de
Mon Jan 31 07:25:08 CET 2011


with r32834, some memalign calls were replaced by av_malloc. This causes
compiler warnings like:

Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_perspective.c:111
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_pp7.c:353
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_perspective.c:111
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_pp7.c:353
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_perspective.c:111
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_pp7.c:353
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_perspective.c:111
Function `av_malloc' implicitly converted to pointer at libmpcodecs/vf_pp7.c:353


Moreover, the launchpad daily builders let this build fail with this error:

,----
| Our automated build log filter detected the problem(s) above that will
| likely cause your package to segfault on architectures where the size of
| a pointer is greater than the size of an integer, such as ia64 and amd64.
| 
| This is often due to a missing function prototype definition.
| 
| Since use of implicitly converted pointers is always fatal to the application
| on ia64, they are errors.  Please correct them for your next upload.
| 
| More information can be found at:
|     http://wiki.debian.org/ImplicitPointerConversions
`----

The following patch should fix the problem. OK to apply, or should I
better include "libavutil/mem.h", which actually provides to prototype
of av_malloc()?

Index: libmpcodecs/vf_pp.c
===================================================================
--- libmpcodecs/vf_pp.c	(Revision 32834)
+++ libmpcodecs/vf_pp.c	(Arbeitskopie)
@@ -34,6 +34,7 @@
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
+#include "libavutil/common.h"
 #include "libavutil/internal.h"
 #include "libpostproc/postprocess.h"
 
Index: libmpcodecs/vf_perspective.c
===================================================================
--- libmpcodecs/vf_perspective.c	(Revision 32834)
+++ libmpcodecs/vf_perspective.c	(Arbeitskopie)
@@ -32,6 +32,8 @@
 #include <malloc.h>
 #endif
 
+#include "libavutil/common.h"
+
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"


-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4


More information about the MPlayer-dev-eng mailing list