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

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

From:
Craig A. Berry
Date:
July 23, 2001 13:34
Subject:
[PATCH perl@11446] util.c: return required in Perl_my_fork
Message ID:
5.1.0.14.0.20010723152732.02ad4470@exchi01
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

Pid_t
^
%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 @@
 #else
     /* 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]





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About