aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-07-16 22:08:04 +0300
committerPeter Eisentraut <peter_e@gmx.net>2012-07-16 22:08:04 +0300
commita76c857eba977a91a07ab752d4811eb5734f0b5c (patch)
tree16c8205d88f1abc423ccb3a42cf85e7fecfbf53f /src
parentc92be3c0595d504a1516e7e158d085150ff1c4dc (diff)
downloadpostgresql-a76c857eba977a91a07ab752d4811eb5734f0b5c.tar.gz
postgresql-a76c857eba977a91a07ab752d4811eb5734f0b5c.zip
Add comment why seemingly dead code is necessary
Diffstat (limited to 'src')
-rw-r--r--src/pl/plperl/plperl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index db584c4e7e4..4415efafec0 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -832,7 +832,15 @@ pp_require_safe(pTHX)
RETPUSHYES;
DIE(aTHX_ "Unable to load %s into plperl", name);
- return NULL; /* keep compiler quiet */
+ /*
+ * In most Perl versions, DIE() expands to a return statement, so the next
+ * line is not necessary. But in versions between but not including 5.11.1
+ * and 5.13.3 it does not, so the next line is necessary to avoid a
+ * "control reaches end of non-void function" warning from gcc. Other
+ * compilers such as Solaris Studio will, however, issue a "statement not
+ * reached" warning instead.
+ */
+ return NULL;
}