Hello,

A little remark about this patch:
Actually the right way to fix this warning would be to add this attribute in 
src/funcs.h:
  void Exit(int status) __attribute__ ((noreturn));

This way the compiler will know, and the "compiler food" will not be needed.
However, I do not propose a patch with this as this is a GNU extension in GCC, 
so I is may fail with other compilers, and I do not know the right macros to 
have it set in compliance with autotool's configure's detection.

Regards,
Christophe.


----- crmafra <[email protected]> a écrit :
> This is an automated email from the git hooks/post-receive script. It was
> generated because a ref change was pushed to the repository containing
> the project wmaker-crm.git.
> 
> The branch, next has been updated
>        via  aaf934eb2fdb76a57520eda35f77e27e1c149722 (commit)
>       from  056a290a7deec098de72f81a48edbb83b1faf42f (commit)
> 
> Those revisions listed above that are new to this repository have
> not appeared on any other notification email; so we list those
> revisions in full, below.
> 
> - Log -----------------------------------------------------------------
> http://repo.or.cz/w/wmaker-crm.git/commit/aaf934eb2fdb76a57520eda35f77e27e1c149722
> 
> commit aaf934eb2fdb76a57520eda35f77e27e1c149722
> Author: Iain Patterson <[email protected]>
> Date:   Wed Apr 4 12:41:38 2012 +0100
> 
>     Compiler food.
>     
>     main.c: In function ‘RelaunchWindow’:
>     main.c:461:1: warning: control reaches end of non-void function
>     [-Wreturn-type]
>     
>     Actually we can't reach the end of the function because the three
>     possible cases are Exit(-1), return False and return True.  Of course if
>     Exit() were ever changed the above statement might become incorrect.
>     Some compiler food silences the warning.
> 
> diff --git a/src/main.c b/src/main.c
> index 7d44983..6696c2c 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -458,6 +458,8 @@ Bool RelaunchWindow(WWindow *wwin)
>               return True;
>       }
>  
> +     /* compiler food */
> +     return True;
>  }
>  
>  /*
> 
> -----------------------------------------------------------------------
> 
> Summary of changes:
>  src/main.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> 
> repo.or.cz automatic notification. Contact project admin [email protected]
> if you want to unsubscribe, or site admin [email protected] if you receive
> no reply.
> -- 
> wmaker-crm.git ("The Window Maker window manager")
> 
> 
> -- 
> To unsubscribe, send mail to [email protected].


--
To unsubscribe, send mail to [email protected].

Reply via email to