projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cc65be
)
Only warn about reaching the end of a non-void function, if the return type is valid.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 28 Aug 2008 11:28:16 +0000
(11:28 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 28 Aug 2008 11:28:16 +0000
(11:28 +0000)
[r21535]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
d764818
..
c9df2f3
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-4898,6
+4898,7
@@
found_break_parent:
type_t *const ret = skip_typeref(type->function.return_type);
if (warning.return_type &&
!is_type_atomic(ret, ATOMIC_TYPE_VOID) &&
+ is_type_valid(ret) &&
!is_sym_main(current_function->symbol)) {
warningf(&stmt->base.source_position,
"control reaches end of non-void function");