Index: octave-forge/sockets-1.0.7/src/sockets.cc
===================================================================
--- octave-forge.orig/sockets-1.0.7/src/sockets.cc
+++ octave-forge/sockets-1.0.7/src/sockets.cc
@@ -133,7 +133,7 @@ public:
   bool print_as_scalar (void) const { return true;}
 
   // Still undefined.
-  bool is_data_available() {};
+  bool is_data_available() { return false; };
 
   /**
    * Overloaded methods to print the fd as the socket id
Index: octave-forge/audio-1.1.4/src/endpoint.cc
===================================================================
--- octave-forge.orig/audio-1.1.4/src/endpoint.cc
+++ octave-forge/audio-1.1.4/src/endpoint.cc
@@ -418,6 +418,9 @@ EPTAG endpointer::getendpoint
                 return (EP_SIGNAL);	// assume still in signal
             }
     }
+
+  // no-return-in-nonvoid-function
+  return EP_NONE;
 } // end endpointer::getendpoint
 
 
Index: octave-forge/optim-1.0.17/src/samin.cc
===================================================================
--- octave-forge.orig/optim-1.0.17/src/samin.cc
+++ octave-forge/optim-1.0.17/src/samin.cc
@@ -469,4 +469,7 @@ Example: see samin_example\n\
 			x = xopt;
 		}
 	}
+
+  // no-return-in-nonvoid-function
+  return octave_value_list();
 }
Index: octave-forge/ocs-0.1.3/src/Mshichmanhodgesmosfet.cc
===================================================================
--- octave-forge.orig/ocs-0.1.3/src/Mshichmanhodgesmosfet.cc
+++ octave-forge/ocs-0.1.3/src/Mshichmanhodgesmosfet.cc
@@ -546,4 +546,6 @@ the output structures.\n\
       return retval;
     }
 
+  // no-return-in-nonvoid-function
+  return octave_value_list();
 }
Index: octave-forge/nan-2.5.2/src/str2array.cpp
===================================================================
--- octave-forge.orig/nan-2.5.2/src/str2array.cpp
+++ octave-forge/nan-2.5.2/src/str2array.cpp
@@ -126,6 +126,8 @@ int str2val(char *s, double *r, double *
 		// conversion failed 
 		return(0); 
 	}
+
+  return(0);
 }
 
 
Index: octave-forge/nan-2.5.2/src/sumskipnan_mex.cpp
===================================================================
--- octave-forge.orig/nan-2.5.2/src/sumskipnan_mex.cpp
+++ octave-forge/nan-2.5.2/src/sumskipnan_mex.cpp
@@ -520,6 +520,7 @@ inline int __sumskipnan2w__(double *data
 #endif
 	*s  = sum;
 
+	return(0);
 }
 
 
@@ -576,6 +577,8 @@ inline int __sumskipnan3w__(double *data
 #endif
 	*s  = sum;
 	*s2 = msq; 
+   
+        return(0);
 }
 
 inline int __sumskipnan2wr__(double *data, size_t Ni, double *s, double *No, char *flag_anyISNAN, double *W)
@@ -630,6 +633,7 @@ inline int __sumskipnan2wr__(double *dat
 #endif
 	*s  = sum;
 
+	return(0);
 }
 
 
@@ -686,6 +690,8 @@ inline int __sumskipnan3wr__(double *dat
 #endif
 	*s  = sum;
 	*s2 = msq; 
+
+	return(0);
 }
 
 
@@ -768,7 +774,7 @@ inline int __sumskipnan2we__(double *dat
 	if (flag && (flag_anyISNAN != NULL)) *flag_anyISNAN = 1; 
 #endif
 	*s  = sum;
-
+	return(0);
 }
 
 
@@ -852,6 +858,8 @@ inline int __sumskipnan3we__(double *dat
 #endif
 	*s  = sum;
 	*s2 = msq; 
+
+	return(0);
 }
 
 inline int __sumskipnan2wer__(double *data, size_t Ni, double *s, double *No, char *flag_anyISNAN, double *W)
@@ -923,6 +931,7 @@ inline int __sumskipnan2wer__(double *da
 #endif
 	*s  = sum;
 
+	return(0);
 }
 
 
@@ -1006,5 +1015,7 @@ inline int __sumskipnan3wer__(double *da
 #endif
 	*s  = sum;
 	*s2 = msq; 
+
+	return(0);
 }
 
Index: octave-forge/control-2.2.5/src/AB13AD.f
===================================================================
--- octave-forge.orig/control-2.2.5/src/AB13AD.f	2010-02-18 17:15:51.000000000 -0300
+++ octave-forge/control-2.2.5/src/AB13AD.f	2012-02-02 13:00:38.414456719 -0300
@@ -262,8 +262,9 @@
 C
 C        Error return.
 C
+         AB13AD = ZERO
          CALL XERBLA( 'AB13AD', -INFO )
          RETURN
       END IF
 C
 C     Quick return if possible.
Index: octave-forge/control-2.2.5/src/AB13AX.f
===================================================================
--- octave-forge.orig/control-2.2.5/src/AB13AX.f	2010-02-18 17:15:51.000000000 -0300
+++ octave-forge/control-2.2.5/src/AB13AX.f	2012-02-02 13:00:52.426456716 -0300
@@ -195,6 +195,7 @@
 C
 C        Error return.
 C
+         AB13AX = ZERO
          CALL XERBLA( 'AB13AX', -INFO )
          RETURN
       END IF
Index: octave-forge/control-2.2.5/src/AB13BD.f
===================================================================
--- octave-forge.orig/control-2.2.5/src/AB13BD.f	2009-12-04 01:46:15.000000000 -0300
+++ octave-forge/control-2.2.5/src/AB13BD.f	2012-02-02 13:02:17.678456705 -0300
@@ -292,6 +292,7 @@
 C
 C        Error return.
 C
+         AB13BD = ZERO
          CALL XERBLA( 'AB13BD', -INFO )
          RETURN
       END IF
Index: octave-forge/control-2.2.5/src/AB13DX.f
===================================================================
--- octave-forge.orig/control-2.2.5/src/AB13DX.f	2009-11-29 01:17:08.000000000 -0300
+++ octave-forge/control-2.2.5/src/AB13DX.f	2012-02-02 13:01:18.990456712 -0300
@@ -324,6 +324,7 @@
       END IF
 C
       IF( INFO.NE.0 ) THEN
+         AB13DX = ZERO
          CALL XERBLA( 'AB13DX', -INFO )
          RETURN
       END IF
#Index: octave-forge/odepkg-0.8.0.orig/src/hairer.diff
#===================================================================
#--- octave-forge.orig/odepkg-0.8.0/src/hairer.diff	2011-06-16 06:56:00.000000000 -0300
#+++ octave-forge/odepkg-0.8.0/src/hairer.diff	2012-02-02 13:57:23.598456313 -0300
#@@ -0,0 +1,11 @@
#+diff -ur hairer.orig/seulex.f hairer/seulex.f
#+--- hairer.orig/seulex.f	2007-02-04 09:40:00.000000000 -0300
#++++ hairer/seulex.f	2012-02-02 13:55:55.198456321 -0300
#+@@ -1179,6 +1179,7 @@
#+       END DO
#+       IF (I.EQ.0) THEN
#+          WRITE (6,*) ' NO DENSE OUTPUT AVAILABLE FOR COMP.',II 
#++         CONTEX=ZERO
#+          RETURN
#+       END IF  
#+ C ----- COMPUTE THE INTERPOLATED VALUE 
--- octave-forge.orig/fl-core-1.0.0/src/fl_compose.cc	2012-04-29 02:41:21.107000132 -0300
+++ octave-forge/fl-core-1.0.0/src/fl_compose.cc	2012-04-29 02:41:31.863000133 -0300
@@ -21,6 +21,7 @@
 #include <octave/oct.h>
 #include <octave/parse.h>
 #include <pthread.h>    
+#include <unistd.h>    
 
 #define HELP \
 "-*- texinfo -*-\n\
--- octave-forge.orig/sockets-1.0.7/src/sockets.cc	2012-04-29 16:44:27.024000134 -0300
+++ octave-forge/sockets-1.0.7/src/sockets.cc	2012-04-29 17:23:00.483000134 -0300
@@ -34,9 +34,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-#ifdef __CYGWIN__
 #include <unistd.h>
-#endif
 #else
 typedef unsigned int socklen_t;
 #endif
diff -wur parallel-2.0.5/src/config.h.in parallel-2.0.5.nu/src/config.h.in
--- octave-forge.orig/parallel-2.0.5/src/config.h.in	2011-01-25 08:20:39.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/config.h.in	2012-04-30 15:38:24.117000160 -0300
@@ -1,2 +1,6 @@
 /* Define as 1 if Octave version is <= 3.2.4. */
 #undef OCTAVE_LE_3_2_4
+
+/* Define as 1 if we have unistd.h */
+#undef HAVE_UNISTD_H
+
diff -wur parallel-2.0.5/src/connect.cc parallel-2.0.5.nu/src/connect.cc
--- octave-forge.orig/parallel-2.0.5/src/connect.cc	2011-02-25 05:58:49.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/connect.cc	2012-04-30 15:45:03.904000174 -0300
@@ -30,6 +30,12 @@
 #include <netdb.h>
 #include <netinet/in.h> // reported necessary for FreeBSD-8
 
+#include "config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #include "sock-stream.h"
 
 // COMM
diff -wur parallel-2.0.5/src/pserver.cc parallel-2.0.5.nu/src/pserver.cc
--- octave-forge.orig/parallel-2.0.5/src/pserver.cc	2011-02-25 05:58:49.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/pserver.cc	2012-04-30 15:44:51.433000171 -0300
@@ -39,6 +39,11 @@
 
 #include "config.h"
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+
 #ifndef OCTAVE_LE_3_2_4
 
 // Octave > 3.2.4 does not have these in a header file, but in
diff -wur parallel-2.0.5/src/recv.cc parallel-2.0.5.nu/src/recv.cc
--- octave-forge.orig/parallel-2.0.5/src/recv.cc	2011-02-25 05:58:49.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/recv.cc	2012-04-30 15:44:03.590000160 -0300
@@ -27,6 +27,11 @@
 #include <netinet/in.h>
 #include <netdb.h>
 
+#include "config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 DEFUN_DLD (recv, args, nargout, "recv (socket)\n\
 \n\
diff -wur parallel-2.0.5/src/reval.cc parallel-2.0.5.nu/src/reval.cc
--- octave-forge.orig/parallel-2.0.5/src/reval.cc	2011-02-25 05:58:49.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/reval.cc	2012-04-30 15:41:58.079000160 -0300
@@ -30,6 +30,7 @@
 #include "oct-obj.h"
 #include "utils.h"
 #include "oct-env.h"
+#include "config.h"
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -39,7 +40,10 @@
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netdb.h>
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 // SSIZE_MAX might be for 64-bit. Limit to 2^31-1
 #define BUFF_SIZE 2147483647
diff -wur parallel-2.0.5/src/sclose.cc parallel-2.0.5.nu/src/sclose.cc
--- octave-forge.orig/parallel-2.0.5/src/sclose.cc	2011-02-25 05:58:49.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/sclose.cc	2012-04-30 15:42:23.390000157 -0300
@@ -31,6 +31,7 @@
 #include "oct-obj.h"
 #include "utils.h"
 #include "oct-env.h"
+#include "config.h"
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -39,7 +40,10 @@
 #include <netinet/in.h>
 #include <errno.h>
 #include <netdb.h>
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #define BUFF_SIZE SSIZE_MAX
 
diff -wur parallel-2.0.5/src/select.cc parallel-2.0.5.nu/src/select.cc
--- octave-forge.orig/parallel-2.0.5/src/select.cc	2009-03-30 05:05:45.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/select.cc	2012-04-30 15:43:11.907000115 -0300
@@ -22,8 +22,10 @@
 #else
 #include <sys/time.h>
 #include <sys/types.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#endif
 #include <errno.h>
 #include <map>
 
diff -wur parallel-2.0.5/src/send.cc parallel-2.0.5.nu/src/send.cc
--- octave-forge.orig/parallel-2.0.5/src/send.cc	2011-02-25 05:58:49.000000000 -0300
+++ octave-forge/parallel-2.0.5/src/send.cc	2012-04-30 15:44:12.746000161 -0300
@@ -26,6 +26,12 @@
 #include <netinet/in.h>
 #include <netdb.h>
 
+#include "config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 
 DEFUN_DLD (send, args, , "send (X, sockets)\n\
 \n\
