develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH perl@11446] util.c: return required in Perl_my_fork

Craig A. Berry
July 23, 2001 13:34
[PATCH perl@11446] util.c: return required in Perl_my_fork
Message ID:
The patch at the end of this message adds a statement that can never be 
reached, but without it the build on a platform without fork() fails with:

CC/DECC/NOANSI_ALIAS /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/Define=PERL_CORE UTIL.C

%CC-W-MISSINGRETURN, Non-void function "Perl_my_fork" does not contain a return statement.
at line number 2145 in file D0:[CRAIG.PERL]UTIL.C;1

This was with Compaq C V6.4-005 on OpenVMS Alpha V7.2-1.

--- util.c;-0   Sat Jul 21 19:02:54 2001
+++ util.c      Mon Jul 23 16:14:57 2001
@@ -2160,6 +2160,7 @@
     /* this "canna happen" since nothing should be calling here if !HAS_FORK */
     Perl_croak_nocontext("fork() not available");
+    return 0;
 #endif /* HAS_FORK */
[end of patch] Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About