[elinks-dev] Re: [ELinks] elinks - jonas: Wrap unused event parameters in #if 0 #endif

Karsten Schölzel kuser at gmx.de
Wed Oct 1 08:39:20 PDT 2003


> @@ -76,7 +80,9 @@
>  {
>  	unsigned char **html = va_arg(ap, unsigned char **);
>  	int *html_len = va_arg(ap, int *);
> +#if 0 /* This event argument is still not used by this backend */
>  	struct session *ses = va_arg(ap, struct session *);
> +#endif
>  	unsigned char *url = va_arg(ap, unsigned char *);
>  	SCM proc;
>  	SCM x;
> 
> 
#if 0/#endif is a preprocessor construct and behaves like a comment so
the compiler doesn't see the definition of ses, also ignoring the va_arg
call. So url will be set to the third argument instead of the fourth
one, which is wrong :(

Karsten Schölzel



More information about the elinks-dev mailing list