]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/worm.c
ncurses 6.0 - patch 20151226
[ncurses.git] / test / worm.c
index f64911c632cf053ee612e642ba41a3d704d7eb71..c3fc0da822ef2619246c5ed831c0d9eb9bee48af 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -61,7 +61,7 @@ Options:
   traces will be dumped.  The program stops and waits for one character of
   input at the beginning and end of the interval.
 
   traces will be dumped.  The program stops and waits for one character of
   input at the beginning and end of the interval.
 
-  $Id: worm.c,v 1.62 2012/12/15 18:32:40 tom Exp $
+  $Id: worm.c,v 1.65 2013/06/22 20:01:41 tom Exp $
 */
 
 #include <test.priv.h>
 */
 
 #include <test.priv.h>
@@ -217,7 +217,7 @@ cleanup(void)
     endwin();
 }
 
     endwin();
 }
 
-static RETSIGTYPE
+static void
 onsig(int sig GCC_UNUSED)
 {
     cleanup();
 onsig(int sig GCC_UNUSED)
 {
     cleanup();
@@ -362,8 +362,7 @@ draw_all_worms(void)
     if (first) {
        first = FALSE;
        for (n = 0, w = &worm[0]; n < number; n++, w++) {
     if (first) {
        first = FALSE;
        for (n = 0, w = &worm[0]; n < number; n++, w++) {
-           int rc;
-           rc = pthread_create(&(w->thread), NULL, start_worm, w);
+           (void) pthread_create(&(w->thread), NULL, start_worm, w);
        }
     }
 #else
        }
     }
 #else
@@ -502,7 +501,7 @@ main(int argc, char *argv[])
 
 #define SET_COLOR(num, fg) \
            init_pair(num+1, (short) fg, (short) bg); \
 
 #define SET_COLOR(num, fg) \
            init_pair(num+1, (short) fg, (short) bg); \
-           flavor[num] |= COLOR_PAIR(num+1) | A_BOLD
+           flavor[num] |= (chtype) COLOR_PAIR(num+1) | A_BOLD
 
        SET_COLOR(0, COLOR_GREEN);
        SET_COLOR(1, COLOR_RED);
 
        SET_COLOR(0, COLOR_GREEN);
        SET_COLOR(1, COLOR_RED);