El 07.04.2012 16:07, [email protected] escribió:
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.
Hello,
IMO if one function is declared to return a value, the function should
return a value.
In this case, this function should return a Bool value, if the value is
not returned,
is not correct.
On the other hand, this is the code in the function:
457 XFreeStringList(argv);
458 return True;
459 }
460
461 /* compiler food */
462 return True;
463 }
IMO, the code should be:
457 XFreeStringList(argv);
--removed line---
458 }
459
460 /* Work done, all ok */
461 return True;
462 }
And:
438 for (i = 0; i < argc; i++) a[i] = argv[i];
438 for (i = 0; i < argc; i++)
439 a[i] = argv[i];
kix
----- 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].
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to [email protected].