[PATCH] "privates.h", line 198: warning: void function cannot return value

Jeremy Huddleston jeremyhu at apple.com
Fri May 20 22:37:52 PDT 2011


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>


On May 20, 2011, at 9:17 PM, Alan Coopersmith wrote:

> Providing an argument to return in a function with void return type
> is not allowed by the C standard, and makes the Sun compilers unhappy.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> include/privates.h |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/privates.h b/include/privates.h
> index 7ef2cb7..2b0040c 100644
> --- a/include/privates.h
> +++ b/include/privates.h
> @@ -195,7 +195,7 @@ dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenP
> static inline void
> dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen, pointer val)
> {
> -    return dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
> +    dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
> }
> 
> static inline pointer
> -- 
> 1.7.3.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 



More information about the xorg-devel mailing list