This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Patch: fix warning
- From: Jasper Lievisse Adriaanse <jasper at humppa dot nl>
- To: Torsten Rupp <torsten dot rupp at aicas dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Thu, 10 Feb 2011 14:45:53 +0100
- Subject: Re: Patch: fix warning
- References: <201101181043.32246.torsten.rupp@aicas.com>
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."