[FFmpeg-devel] [PATCH 17/17] lavu/error: fix make checkheaders.
Clément Bœsch
ubitux at gmail.com
Wed May 9 22:54:47 CEST 2012
On Wed, May 09, 2012 at 02:56:42PM +0200, Michael Niedermayer wrote:
> On Wed, May 09, 2012 at 01:18:56PM +0200, Clément Bœsch wrote:
> > On Wed, May 09, 2012 at 12:43:56PM +0200, Michael Niedermayer wrote:
> > > On Wed, May 09, 2012 at 10:01:42AM +0200, Clément Bœsch wrote:
> > > > From: Clément Bœsch <clement.boesch at smartjog.com>
> > > >
> > > > The errors need to be defined before including functions depending on
> > > > them. See av_size_mult() for instance.
> > > > ---
> > > > libavutil/error.h | 3 ++-
> > > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/libavutil/error.h b/libavutil/error.h
> > > > index 3b05e4b..6a7eec6 100644
> > > > --- a/libavutil/error.h
> > > > +++ b/libavutil/error.h
> > > > @@ -25,7 +25,6 @@
> > > > #define AVUTIL_ERROR_H
> > > >
> > > > #include <errno.h>
> > > > -#include "avutil.h"
> > >
> > > probably should be include stddef.h or so
> > >
> >
> > I included unistd.h at first (for the size_t in the prototype below), but
> > it conflicted with too much internal symbols (like sync() or close())
> > so I thought it wasn't that a good idea.
>
> iam not sure why you would include unistd.h ...
>
> ISO C:
> 7.17 Common definitions <stddef.h>
> 1 The following types and macros are defined in the standard header <stddef.h>. Some
> are also defined in other headers, as noted in their respective subclauses.
> 2 The types are
> ptrdiff_t
> which is the signed integer type of the result of subtracting two pointers;
> size_t
> which is the unsigned integer type of the result of the sizeof operator; and
> wchar_t
> ...
>
Ah, indeed...
--
Clément B.
-------------- next part --------------
From bd76e3c035caa147f1e8084b6ddb8b83cab164ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <clement.boesch at smartjog.com>
Date: Wed, 9 May 2012 09:57:33 +0200
Subject: [PATCH 17/17] lavu/error: fix make checkheaders.
The errors need to be defined before including functions depending on
them. See av_size_mult() for instance. stddef.h is included for the
prototype of av_sterror (use of size_t).
---
libavutil/error.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/error.h b/libavutil/error.h
index 3b05e4b..316734f 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -25,7 +25,7 @@
#define AVUTIL_ERROR_H
#include <errno.h>
-#include "avutil.h"
+#include <stddef.h>
/**
* @addtogroup lavu_error
--
1.7.10.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120509/fd59450b/attachment.asc>
More information about the ffmpeg-devel
mailing list