[libav-devel] [PATCH] arm: dsputil: Add missing config.h #include for restrict keyword

Martin Storsjö martin at martin.st
Fri Mar 14 11:26:05 CET 2014


On Fri, 14 Mar 2014, Diego Biurrun wrote:

> ---
> libavcodec/arm/dsputil_init_armv6.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/arm/dsputil_init_armv6.c b/libavcodec/arm/dsputil_init_armv6.c
> index 357ae1e..ce64a85 100644
> --- a/libavcodec/arm/dsputil_init_armv6.c
> +++ b/libavcodec/arm/dsputil_init_armv6.c
> @@ -20,6 +20,7 @@
>
> #include <stdint.h>
>
> +#include "config.h"
> #include "libavutil/attributes.h"
> #include "libavcodec/avcodec.h"
> #include "libavcodec/dsputil.h"
> -- 
> 1.8.3.2

We could just as well drop the restrict keyword - before compiliation was 
broken this used to produce a warning:

libavcodec/arm/dsputil_init_armv6.c(69) : warning C4028: formal 
parameter 2 different from declaration

(It's harmless though - the function takes a restrict parameter, but the 
function is set to a function pointer that doesn't have the restrict 
keyword for that parameter.)

The fact that this fixed a broken build should IMO be mentioned in the 
commit message, to differentiate this from "let's add headers for 
everything that is needed, even if things compile fine today". (FYI 
ed9625eb was the commit that broke it, I just bisected.)

// Martin


More information about the libav-devel mailing list