Patch: fix warning

Jasper Lievisse Adriaanse jasper@humppa.nl
Thu Feb 10 13:46:00 GMT 2011


On Tue, Jan 18, 2011 at 10:43:32AM +0900, Torsten Rupp wrote:
> Dear developers,
> 
> the file debug.c may produce a warning of missing prototypes when not 
> compiled with FFI_DEBUG defined. The attached patch wrap the 
> functions in debug.c with a #ifdef FFI_DEBUG to fix this warning.
> 
> Torsten
Hi,

I think the #ifdef line should be the very first line in the file, even before
including any other files.
 
> -- 
> aicas GmbH
> ???300-1525 * ???????????????????????????4-27-3 * Japan
> http://www.aicas.com * ????????????/FAX???+81-297-82-3908
> 
> USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
> Gesch??ftsf??hrer: Dr. James J. Hunt

> --- libffi-3.0.9/src/debug.c	2009-12-30 00:22:26.000000000 +0900
> +++ libffi-3.0.9-new/src/debug.c	2011-01-18 10:40:50.009145497 +0900
> @@ -27,6 +27,7 @@
>  #include <stdlib.h>
>  #include <stdio.h>
>  
> +#ifdef FFI_DEBUG
>  /* General debugging routines */
>  
>  void ffi_stop_here(void)
> @@ -57,3 +58,4 @@
>    FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line);
>  
>  }
> +#endif


-- 
Cheers,
Jasper

"Capable, generous men do not create victims, they nurture them."



More information about the Libffi-discuss mailing list