On Mon, Mar 10, 2014 at 06:31:33PM -0400, Peter Harris wrote:
> Even though -Wcomment doesn't mind it (in gcc or clang), the appearance
> of */* confuses the syntax highlighter of some editors (eg. vim), and
> causes warnings in MSVC.
> 
> Signed-off-by: Peter Harris <[email protected]>
...
> diff --git a/include/callback.h b/include/callback.h
> index df638c0..fe7015e 100644
> --- a/include/callback.h
> +++ b/include/callback.h
> @@ -64,16 +64,16 @@ typedef struct _CallbackList *CallbackListPtr;  /* also 
> in misc.h */
>  
>  typedef void (*CallbackProcPtr) (CallbackListPtr *, void *, void *);
>  
> -extern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ ,
> -                                  CallbackProcPtr /*callback */ ,
> -                                  void */*data */ );
> +extern _X_EXPORT Bool AddCallback(CallbackListPtr *pcbl,
> +                                  CallbackProcPtr callback,
> +                                  void *data);

I was always told that I should avoid function argument names in
prototypes in header files because they can break when macros are
used; but this patch adds such names.

Does adding a space in '*/*', i.e. making it '* /*', also work?

Like this:
extern _X_EXPORT Bool AddCallback(CallbackListPtr * /* pcbl */,
                                  CallbackProcPtr /* callback */,
                                  void * /* data */);

 Thomas
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to