]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20110521
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 22 May 2011 00:54:42 +0000 (00:54 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 22 May 2011 00:54:42 +0000 (00:54 +0000)
+ fix warnings from clang 2.7 "--analyze"

16 files changed:
NEWS
dist.mk
menu/m_driver.c
ncurses/base/wresize.c
ncurses/tinfo/comp_expand.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_tparm.c
panel/panel.priv.h
progs/tabs.c
progs/tic.c
progs/toe.c
progs/tset.c
test/ditto.c
test/ncurses.c
test/redraw.c
test/view.c

diff --git a/NEWS b/NEWS
index 7b2b35e947d960aaef8fc8c3db743602e42699b6..ce060b4b0522ac5768ffb47a3f905842f0d91bb3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1703 2011/05/14 21:49:54 tom Exp $
+-- $Id: NEWS,v 1.1704 2011/05/21 19:01:38 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,9 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20110521
+       + fix warnings from clang 2.7 "--analyze"
+
 20110514
        + compiler-warning fixes in panel and progs.
        + modify CF_PKG_CONFIG macro, from changes to tin -TD
 20110514
        + compiler-warning fixes in panel and progs.
        + modify CF_PKG_CONFIG macro, from changes to tin -TD
diff --git a/dist.mk b/dist.mk
index 6dfe3a247d08485d27048ff48583470678f51c37..92c4856a4c464ac0b17aa05bdbc986bbe7f9df80 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.816 2011/05/14 17:22:21 tom Exp $
+# $Id: dist.mk,v 1.817 2011/05/21 17:35:14 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20110514
+NCURSES_PATCH = 20110521
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index deeff4710c089ce3497c4eedb159843d8b92dc57..dcc1c55d83a237d7c37716e6a0ff03f674bb0dd9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 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            *
@@ -37,7 +37,7 @@
 
 #include "menu.priv.h"
 
 
 #include "menu.priv.h"
 
-MODULE_ID("$Id: m_driver.c,v 1.29 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_driver.c,v 1.30 2011/05/21 18:56:41 tom Exp $")
 
 /* Macros */
 
 
 /* Macros */
 
@@ -537,7 +537,11 @@ menu_driver(MENU * menu, int c)
        result = E_UNKNOWN_COMMAND;
     }
 
        result = E_UNKNOWN_COMMAND;
     }
 
-  if (E_OK == result)
+  if (item == 0)
+    {
+      result = E_BAD_STATE;
+    }
+  else if (E_OK == result)
     {
       /* Adjust the top row if it turns out that the current item unfortunately
          doesn't appear in the menu window */
     {
       /* Adjust the top row if it turns out that the current item unfortunately
          doesn't appear in the menu window */
index 9a6ea500727eeb57fe2223c168cf01960b12c958..bc6b5732ea41fe05aa46ed575c2db9af8d6b7389 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 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            *
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: wresize.c,v 1.34 2010/06/05 22:36:26 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.35 2011/05/21 18:55:07 tom Exp $")
 
 static int
 cleanup_lines(struct ldat *data, int length)
 
 static int
 cleanup_lines(struct ldat *data, int length)
@@ -175,9 +175,10 @@ wresize(WINDOW *win, int ToLines, int ToCols)
                for (col = 0; col <= ToCols; ++col)
                    s[col] = win->_nc_bkgd;
            }
                for (col = 0; col <= ToCols; ++col)
                    s[col] = win->_nc_bkgd;
            }
-       } else {
-           assert(pline != 0);
+       } else if (pline != 0 && pline[win->_pary + row].text != 0) {
            s = &pline[win->_pary + row].text[win->_parx];
            s = &pline[win->_pary + row].text[win->_parx];
+       } else {
+           s = 0;
        }
 
        if_USE_SCROLL_HINTS(new_lines[row].oldindex = row);
        }
 
        if_USE_SCROLL_HINTS(new_lines[row].oldindex = row);
index 71012b6355e3c1d7d89d2e296900b4c94390e3a5..840240088949acb7d9a46ef2c257ba41ea720716 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 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            *
@@ -35,7 +35,7 @@
 #include <ctype.h>
 #include <tic.h>
 
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: comp_expand.c,v 1.21 2010/01/16 17:11:23 tom Exp $")
+MODULE_ID("$Id: comp_expand.c,v 1.22 2011/05/21 18:55:07 tom Exp $")
 
 static int
 trailing_spaces(const char *src)
 
 static int
 trailing_spaces(const char *src)
@@ -61,15 +61,15 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers)
     size_t need = (2 + strlen(str)) * 4;
     int ch;
 
     size_t need = (2 + strlen(str)) * 4;
     int ch;
 
-#if NO_LEAKS
     if (srcp == 0) {
     if (srcp == 0) {
+#if NO_LEAKS
        if (buffer != 0) {
            FreeAndNull(buffer);
            length = 0;
        }
        if (buffer != 0) {
            FreeAndNull(buffer);
            length = 0;
        }
+#endif
        return 0;
     }
        return 0;
     }
-#endif
     if (buffer == 0 || need > length) {
        if ((buffer = typeRealloc(char, length = need, buffer)) == 0)
              return 0;
     if (buffer == 0 || need > length) {
        if ((buffer = typeRealloc(char, length = need, buffer)) == 0)
              return 0;
index 992b8c7110a8d70ff6fbc80fe4f92c1d85849040..40af877b5dbe583c73017a785ecf0d8b183b9532 100644 (file)
@@ -47,7 +47,7 @@
 #include <locale.h>
 #endif
 
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.136 2011/04/16 15:32:45 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.137 2011/05/21 17:35:14 tom Exp $")
 
 /****************************************************************************
  *
 
 /****************************************************************************
  *
@@ -547,7 +547,7 @@ _nc_locale_breaks_acs(TERMINAL * termp)
     int value;
     int result = 0;
 
     int value;
     int result = 0;
 
-    if ((env = getenv(env_name)) != 0) {
+    if (getenv(env_name) != 0) {
        result = _nc_getenv_num(env_name);
     } else if ((value = tigetnum("U8")) >= 0) {
        result = value;         /* use extension feature */
        result = _nc_getenv_num(env_name);
     } else if ((value = tigetnum("U8")) >= 0) {
        result = value;         /* use extension feature */
index 7cd12f7f6845e3c14820d43725ac6c00e5d92f8b..b1d79248d0fdbfb03914a1ffb3fb0d00893633be 100644 (file)
@@ -42,7 +42,7 @@
 #include <ctype.h>
 #include <tic.h>
 
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.82 2011/01/15 22:19:12 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.83 2011/05/21 18:11:56 tom Exp $")
 
 /*
  *     char *
 
 /*
  *     char *
@@ -522,7 +522,7 @@ tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
     }
 #ifdef TRACE
     if (USE_TRACEF(TRACE_CALLS)) {
     }
 #ifdef TRACE
     if (USE_TRACEF(TRACE_CALLS)) {
-       for (i = 0; i < popcount; i++) {
+       for (i = 0; i < num_args; i++) {
            if (p_is_s[i] != 0)
                save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
            else
            if (p_is_s[i] != 0)
                save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
            else
index ce4f98937fc91c7a5f6677d8cfdb29edf3e821f5..016a84c18532c72acc9bce5c84b0e79d1cb21dfc 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2011 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            *
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 
  * authorization.                                                           *
  ****************************************************************************/
 
-/* $Id: panel.priv.h,v 1.23 2009/04/11 20:33:55 tom Exp $ */
+/* $Id: panel.priv.h,v 1.24 2011/05/21 18:55:07 tom Exp $ */
 
 #ifndef NCURSES_PANEL_PRIV_H
 #define NCURSES_PANEL_PRIV_H 1
 
 #ifndef NCURSES_PANEL_PRIV_H
 #define NCURSES_PANEL_PRIV_H 1
@@ -160,7 +160,7 @@ struct screen;              /* forward declaration */
 ---------------------------------------------------------------------------*/
 #define PANEL_UPDATE(pan,panstart)\
 {  PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
 ---------------------------------------------------------------------------*/
 #define PANEL_UPDATE(pan,panstart)\
 {  PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
-   while(pan2) {\
+   while(pan2 && pan2->win) {\
       if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
         int y, ix1, ix2, iy1, iy2;\
         COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
       if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
         int y, ix1, ix2, iy1, iy2;\
         COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
index e0e042b3e5223adf0775738926a71cbe5e5779fb..2f6915de9c468b9e20a021681d8d212fbd74997e 100644 (file)
@@ -37,7 +37,7 @@
 #define USE_LIBTINFO
 #include <progs.priv.h>
 
 #define USE_LIBTINFO
 #include <progs.priv.h>
 
-MODULE_ID("$Id: tabs.c,v 1.20 2011/05/14 22:34:36 tom Exp $")
+MODULE_ID("$Id: tabs.c,v 1.21 2011/05/21 18:31:21 tom Exp $")
 
 static void usage(void) GCC_NORETURN;
 
 
 static void usage(void) GCC_NORETURN;
 
@@ -353,7 +353,6 @@ main(int argc, char *argv[])
     bool no_op = FALSE;
     int n, ch;
     NCURSES_CONST char *term_name = 0;
     bool no_op = FALSE;
     int n, ch;
     NCURSES_CONST char *term_name = 0;
-    const char *mar_list = 0;  /* ignored */
     char *append = 0;
     const char *tab_list = 0;
 
     char *append = 0;
     const char *tab_list = 0;
 
@@ -446,7 +445,11 @@ main(int argc, char *argv[])
            while ((ch = *++option) != '\0') {
                switch (ch) {
                case 'm':
            while ((ch = *++option) != '\0') {
                switch (ch) {
                case 'm':
-                   mar_list = option;
+                   /*
+                    * The "+mXXX" option is unimplemented because only the long-obsolete
+                    * att510d implements smgl, which is needed to support
+                    * this option.
+                    */
                    break;
                default:
                    /* special case of relative stops separated by spaces? */
                    break;
                default:
                    /* special case of relative stops separated by spaces? */
index 62f1f0a3be3507f57323dd36ee78bb7fe39e865b..739e7ed71ac4aa7fab979c6fdca22d176391e4a8 100644 (file)
@@ -44,7 +44,7 @@
 #include <dump_entry.h>
 #include <transform.h>
 
 #include <dump_entry.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.149 2011/05/14 23:24:57 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.150 2011/05/21 18:15:45 tom Exp $")
 
 const char *_nc_progname = "tic";
 
 
 const char *_nc_progname = "tic";
 
@@ -339,23 +339,23 @@ put_translate(int c)
 static char *
 stripped(char *src)
 {
 static char *
 stripped(char *src)
 {
+    char *dst = 0;
+
     while (isspace(UChar(*src)))
        src++;
     while (isspace(UChar(*src)))
        src++;
+
     if (*src != '\0') {
     if (*src != '\0') {
-       char *dst;
        size_t len;
 
        size_t len;
 
-       if ((dst = strdup(src)) == NULL)
+       if ((dst = strdup(src)) == NULL) {
            failed("strdup");
            failed("strdup");
-
-       assert(dst != 0);
-
-       len = strlen(dst);
-       while (--len != 0 && isspace(UChar(dst[len])))
-           dst[len] = '\0';
-       return dst;
+       } else {
+           len = strlen(dst);
+           while (--len != 0 && isspace(UChar(dst[len])))
+               dst[len] = '\0';
+       }
     }
     }
-    return 0;
+    return dst;
 }
 
 static FILE *
 }
 
 static FILE *
index 3203b5bd4833b8635e2225c693b2c67c53168502..eff8cc84f24163c50aa6b88107d36cde952be90a 100644 (file)
@@ -44,7 +44,7 @@
 #include <hashed_db.h>
 #endif
 
 #include <hashed_db.h>
 #endif
 
-MODULE_ID("$Id: toe.c,v 1.53 2011/05/14 22:35:49 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.54 2011/05/21 18:32:13 tom Exp $")
 
 #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
 
 
 #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
 
@@ -61,6 +61,8 @@ ExitProgram(int code)
 }
 #endif
 
 }
 #endif
 
+static void failed(const char *) GCC_NORETURN;
+
 static void
 failed(const char *msg)
 {
 static void
 failed(const char *msg)
 {
index 615226a7484f67b552979243f4b3a0ad602af0b7..71a1845ff7d0b2512d5b4847bd1b54d2ed246c97 100644 (file)
@@ -119,7 +119,7 @@ char *ttyname(int fd);
 #include <dump_entry.h>
 #include <transform.h>
 
 #include <dump_entry.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tset.c,v 1.83 2011/05/14 22:50:45 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.84 2011/05/21 18:55:32 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -148,6 +148,10 @@ extern char **environ;
 #undef CTRL
 #define CTRL(x)        ((x) & 0x1f)
 
 #undef CTRL
 #define CTRL(x)        ((x) & 0x1f)
 
+static void failed(const char *) GCC_NORETURN;
+static void exit_error(void) GCC_NORETURN;
+static void err(const char *,...) GCC_NORETURN;
+
 const char *_nc_progname = "tset";
 
 static TTY mode, oldmode, original;
 const char *_nc_progname = "tset";
 
 static TTY mode, oldmode, original;
index 636a6eeceb62927ec7876a190f1c4e771af350d2..36644f1274b9e427ad685ca2d4ceb287d9974a7a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 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            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
- * $Id: ditto.c,v 1.40 2010/11/14 01:06:47 tom Exp $
+ * $Id: ditto.c,v 1.41 2011/05/21 18:55:07 tom Exp $
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
@@ -98,6 +98,9 @@ typedef struct {
     DITTO *ditto;              /* data for all screens */
 } DDATA;
 
     DITTO *ditto;              /* data for all screens */
 } DDATA;
 
+static void failed(const char *) GCC_NORETURN;
+static void usage(void) GCC_NORETURN;
+
 static void
 failed(const char *s)
 {
 static void
 failed(const char *s)
 {
index 2900034533458fc5efff503ac685f22988331f45..df2d064c393c488fbda6a3371b3ee01761929cf4 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.367 2011/04/23 21:16:43 tom Exp $
+$Id: ncurses.c,v 1.368 2011/05/21 18:50:56 tom Exp $
 
 ***************************************************************************/
 
 
 ***************************************************************************/
 
@@ -1394,7 +1394,7 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name)
        if (!(termattrs() & test)) {
            printw(" (N/A)");
        } else {
        if (!(termattrs() & test)) {
            printw(" (N/A)");
        } else {
-           if (ncv > 0 && (getbkgd(stdscr) & A_COLOR)) {
+           if (ncv > 0 && stdscr && (getbkgd(stdscr) & A_COLOR)) {
                static const chtype table[] =
                {
                    A_STANDOUT,
                static const chtype table[] =
                {
                    A_STANDOUT,
@@ -4269,8 +4269,10 @@ acs_and_scroll(void)
 
                    neww->next = current ? current->next : 0;
                    neww->last = current;
 
                    neww->next = current ? current->next : 0;
                    neww->last = current;
-                   neww->last->next = neww;
-                   neww->next->last = neww;
+                   if (neww->last != 0)
+                       neww->last->next = neww;
+                   if (neww->next != 0)
+                       neww->next->last = neww;
 
                    neww->wind = getwin(fp);
 
 
                    neww->wind = getwin(fp);
 
index 1fc306f5cd7cd83c2dd92e6a8891d4626a8822d7..96c6b0f308b67a78d0438085fee300e92f0c2e32 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: redraw.c,v 1.6 2011/04/23 20:13:21 tom Exp $
+ * $Id: redraw.c,v 1.7 2011/05/21 18:38:35 tom Exp $
  *
  * Demonstrate the redrawwin() and wredrawln() functions.
  * Thomas Dickey - 2006/11/4
  *
  * Demonstrate the redrawwin() and wredrawln() functions.
  * Thomas Dickey - 2006/11/4
@@ -71,7 +71,7 @@ test_redraw(WINDOW *win)
     keypad(win, TRUE);
     getmaxyx(win, max_y, max_x);
     getbegyx(win, beg_y, beg_x);
     keypad(win, TRUE);
     getmaxyx(win, max_y, max_x);
     getbegyx(win, beg_y, beg_x);
-    while (!done) {
+    while (!done && win != 0) {
        ch = wgetch(win);
        getyx(win, y, x);
        switch (ch) {
        ch = wgetch(win);
        getyx(win, y, x);
        switch (ch) {
index 3b6591e7481d69d213b635f7c9d1df91294d0786..97511ca2159b3aaf6acf59fee84c0fbbefe3dd2e 100644 (file)
@@ -50,7 +50,7 @@
  * scroll operation worked, and the refresh() code only had to do a
  * partial repaint.
  *
  * scroll operation worked, and the refresh() code only had to do a
  * partial repaint.
  *
- * $Id: view.c,v 1.82 2011/05/14 17:43:12 tom Exp $
+ * $Id: view.c,v 1.83 2011/05/21 18:40:49 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -121,6 +121,8 @@ static NCURSES_CH_T **vec_lines;
 static NCURSES_CH_T **lptr;
 static int num_lines;
 
 static NCURSES_CH_T **lptr;
 static int num_lines;
 
+static void usage(void) GCC_NORETURN;
+
 static void
 usage(void)
 {
 static void
 usage(void)
 {