+2014-11-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * gdb.ada/cond_lang/foo.c (callme): Add return type.
+       * gdb.base/call-sc.c (zed): Likewise.
+       * gdb.base/checkpoint.c (main): Likewise.
+       * gdb.base/dump.c (main): Likewise.
+       * gdb.base/gcore.c (main): Likewise.
+       * gdb.base/huge.c (main): Likewise.
+       * gdb.base/multi-forks.c (main): Likewise.
+       * gdb.base/pr10179-a.c (main): Likewise.
+       * gdb.base/savedregs.c (main): Likewise.
+       * gdb.base/sigaltstack.c (main): Likewise.
+       * gdb.base/siginfo.c (main): Likewise.
+       * gdb.base/structs.c (zed): Likewise.
+       * gdb.mi/mi-stack.c (callee3, callee2, callee1, main): Likewise.
+       * gdb.mi/mi-syn-frame.c (main): Likewise.
+       * gdb.mi/until.c (foo, main): Likewise.
+       * gdb.base/global-var-nested-by-dso.c (b_main, c_main): Declare.
+       * gdb.base/solib-weak.c (foo): Declare.
+       * gdb.base/attach-twice.c: Include stdio.h.
+       * gdb.base/weaklib1.c: Likewise.
+       * gdb.base/weaklib2.c: Likewise.
+       * gdb.base/catch-signal-fork.c: Include stdio.h and sys/wait.h.
+       * gdb.mi/mi-condbreak-call-thr-state-mt.c: Include stdio.h and
+       unistd.h.
+       * gdb.base/attach-pie-misread.c: Include stdlib.h.
+       * gdb.mi/mi-exit-code.c: Likewise.
+       * gdb.base/break-interp-lib.c: Include string.h.
+       * gdb.base/coremaker.c: Likewise.
+       * gdb.base/testenv.c: Likewise.
+       * gdb.python/py-finish-breakpoint.c: Likewise.
+       * gdb.base/inferior-died.c: Include sys/wait.h.
+       * gdb.base/fileio.c: Include time.h.
+       * gdb.base/async-shell.c: Include unistd.h.
+       * gdb.base/dprintf-non-stop.c: Likewise.
+       * gdb.base/info-os.c: Likewise.
+       * gdb.mi/mi-console.c: Likewise.
+       * gdb.mi/watch-nonstop.c: Likewise.
+       * gdb.python/py-events.c: Likewise.
+       * gdb.base/async.c (baz): Move up before its invocation.
+       * gdb.base/code_elim2.c (my_global_func): Likewise.
+       * gdb.base/skip-solib-lib.c (multiply): Likewise.
+       * gdb.base/advance.c (func2): Likewise.
+
 2014-11-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * gdb.base/annota1.c: Remove #ifdef PROTOTYPES, keep prototyped
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-extern callme (void);
+extern void callme (void);
 
 void
 c_function (void)
 
   return z;
 }
 
-void func()
+int func2 ()
 {
-  x = x + 5;
-  func2 ();
+  x = 6;
 }
 
-int func2 ()
+void func()
 {
-  x = 6;
+  x = x + 5;
+  func2 ();
 }
 
 int func3 ()
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <unistd.h>
+
 int
 main (void)
 {
 
  return x + y;
 }
 
+int
+baz (void)
+{
+  return 5;
+}
+
 int
 main (void)
 {
  y = baz ();
  return 0; /* until here */
 }
-
-
-int
-baz (void)
-{ 
-  return 5;
-}
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 const char stub[] = {
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/ptrace.h>
 
 #include <unistd.h>
 #include <assert.h>
 #include <stdio.h>
+#include <string.h>
 
 /* Force REL->RELA conversion on i386, see "Prelink", March 4, 2004.  */
 volatile int v[2];
 
   L = foo;
 }
 
-zed ()
+void zed ()
 {
   L = 'Z';
 }
 
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+#include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>
+#include <sys/wait.h>
 #include <unistd.h>
 
 void
 
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <unistd.h>
 
 long lines = 0;
 
-main()
+int main()
 {
   char linebuf[128];
   FILE *in, *out;
   if (!in || !out)
     {
       fprintf (stderr, "File open failed\n");
-      exit (1);
+      return 1;
     }
 
   for (i = 0; ; i++)
   fclose (out);
   printf ("Deleting copy.\n"); /* breakpoint 3 */
   unlink (COPY1_TXT);
-  exit (0);                    /* breakpoint 4 */
+  return 0;                    /* breakpoint 4 */
 }
 
 
 static int my_static_symbol;
 
-int
-main ()
-{
-  return my_global_func ();
-}
-
 int
 my_global_func ()
 {
   my_global_symbol = my_static_symbol + my_global_symbol;
   return my_global_symbol;
 }
+
+int
+main ()
+{
+  return my_global_func ();
+}
 
 #include <signal.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <string.h>
 
 #ifndef __STDC__
 #define        const   /**/
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <unistd.h>
+
 void
 foo ()
 {
 
   memset ((char *) &intstruct2, 0, sizeof (intstruct2));
 }
 
+int
 main()
 {
   int i;
   intstruct.g = 12 * 7;
 
   checkpoint1 ();
+  return 0;
 }
 
 #include <errno.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include <time.h>
 /* TESTS :
  * - open(const char *pathname, int flags, mode_t mode);
 1) Attempt to create file that already exists - EEXIST
 
   return (value);
 }
 
+int
 main()
 {
   factorial_func (6);
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+extern void b_main (void);
+extern void c_main (void);
+
 int
 main (int argc, char *argv[])
 {
 
 #endif
 static int a[CRASH_GDB], b[CRASH_GDB];
 
+int
 main()
 {
   memcpy (a, b, sizeof (a));
 
 
 #include <stdlib.h>
 #include <sys/types.h>
+#include <sys/wait.h>
 #include <unistd.h>
 
 void function(void)
 
 #include <pthread.h>
 #include <arpa/inet.h>
 #include <sys/socket.h>
+#include <unistd.h>
 
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 
 
 pid_t pids[4];
 
+int
 main()
 {
   int i;
   printf ("%d ready\n", getpid ());
   sleep (2);
   printf ("%d done\n", getpid ());
-  exit (0);    /* Set exit breakpoint here.  */
+  return 0;    /* Set exit breakpoint here.  */
 }
 
 
 }
 
+int
 main ()
 {
   signal (SIGILL, catcher);
   signal (SIGSEGV, catcher);
   thrower ();
+  return 0;
 }
 
 }
 
 
+int
 main ()
 {
   /* Set up the altstack.  */
   }
   level = MAIN;
   catcher (0);
+  return 0;
 }
 
 } /* handler */
 #endif
 
+int
 main ()
 {
   /* Set up the signal handler.  */
 
 /* Simple shared library */
 
-int square(int num)
+int multiply(int a, int b)
 {
-  return multiply(num, num);
+  return a * b;
 }
 
-int multiply(int a, int b)
+int square(int num)
 {
-  return a * b;
+  return multiply(num, num);
 }
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+extern void foo (void);
+
 int
 main()
 {
 
   L18 = foo18; 
 }
 
+void
 zed ()
 {
 
 
     inferior environment list.  */
 
 #include <stdio.h>
+#include <string.h>
 
 int main (int argc, char **argv, char **envp)
 
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdio.h>
+
 void __attribute__((weak))
 bar (void)
 {
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdio.h>
+
 void bar (void);
 void
 foo (void)
 
 
 #include <stdlib.h>
 #include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
 
 extern int test (void);
 
 
+#include <unistd.h>
+
 void
 hello ()
 {
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see http://www.gnu.org/licenses/>.  */
 
+#include <stdlib.h>
+
 int exit_code = 0;
 
 int
 
   C = A + B;
   return 0;
 }
-callee3 (char *strarg)
+
+void callee3 (char *strarg)
 {
   callee4 ();
 }
 
-callee2 (int intarg, char *strarg)
+void callee2 (int intarg, char *strarg)
 {
   callee3 (strarg);
 }
 
-callee1 (int intarg, char *strarg, double fltarg)
+void callee1 (int intarg, char *strarg, double fltarg)
 {
   callee2 (intarg, strarg);
 }
 
-main ()
+int main ()
 {
   callee1 (2, "A string argument.", 3.5);
   callee1 (2, "A string argument.", 3.5);
 
 void handler (int);
 void have_a_very_merry_interrupt (void);
 
+int
 main ()
 {
   foo ();   /* Put a breakpoint on foo() and call it to see a dummy frame */
 
 
   have_a_very_merry_interrupt ();
+  return 0;
 }
 
 void
 
+void
 foo (void)
 {
  int i, x, y, z;
  y = 10;
 }
 
+int
 main ()
 {
   int a = 1;
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <unistd.h>
+
 int global;
 
 int main ()
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see  <http://www.gnu.org/licenses/>.  */
 
+#include <unistd.h>
+
 extern void do_nothing (void);
 
 int second(){
 
 
 #include <setjmp.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 /* Defined in py-events-shlib.h.  */