]> granicus.if.org Git - postgresql/commitdiff
Add comment why seemingly dead code is necessary
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 16 Jul 2012 19:08:04 +0000 (22:08 +0300)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 16 Jul 2012 19:08:04 +0000 (22:08 +0300)
src/pl/plperl/plperl.c

index db584c4e7e4743a8368cc08a5777c8377a66be69..4415efafec08c867d202f7a738ba681797151bd5 100644 (file)
@@ -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;
 }