This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9612cb
)
regen/embed.pl: Add sanity test for entries
author
Karl Williamson
<public@khwilliamson.com>
Thu, 27 Dec 2012 16:55:54 +0000
(09:55 -0700)
committer
Karl Williamson
<public@khwilliamson.com>
Fri, 28 Dec 2012 17:38:53 +0000
(10:38 -0700)
A void returning function should not be required to have its return
value tested.
regen/embed.pl
patch
|
blob
|
blame
|
history
diff --git
a/regen/embed.pl
b/regen/embed.pl
index
b46f615
..
cbf421f
100755
(executable)
--- a/
regen/embed.pl
+++ b/
regen/embed.pl
@@
-76,6
+76,9
@@
my ($embed, $core, $ext, $api) = setup_embed();
my @names_of_nn;
my $func;
+ if (! $can_ignore && $retval eq 'void') {
+ warn "It is nonsensical to require the return value of a void function ($plain_func) to be checked";
+ }
my $splint_flags = "";
if ( $SPLINT && !$commented_out ) {
$splint_flags .= '/*@noreturn@*/ ' if $never_returns;