X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Fdemo_menus.c;h=9f3b4d22d2a62f7dce6699dfa489d2042c98a63f;hb=87154b424ea0f67c2965d00e861ddfb134082d94;hp=02f7ca3312fffb7ec5bebb46a20a0b2b9caa8110;hpb=47d2fb4537d9ad5bb14f4810561a327930ca4280;p=ncurses.git diff --git a/test/demo_menus.c b/test/demo_menus.c index 02f7ca33..9f3b4d22 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2021 Thomas E. Dickey * * Copyright 2003-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_menus.c,v 1.71 2020/02/02 23:34:34 tom Exp $ + * $Id: demo_menus.c,v 1.73 2021/05/08 19:41:08 tom Exp $ * * Demonstrate a variety of functions from the menu library. * Thomas Dickey - 2005/4/9 @@ -113,7 +113,7 @@ static bool loaded_file = FALSE; static char empty[1]; #ifdef TRACE -static void failed(const char *s) GCC_NORETURN; +static GCC_NORETURN void failed(const char *s); static void failed(const char *s) @@ -565,7 +565,7 @@ tracetrace(unsigned tlevel) } _nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel); if (tlevel == 0) { - _nc_STRCAT(buf, t_tbl[0].name, need); + _nc_STRCAT(buf, t_tbl[0].name ? t_tbl[0].name : "", need); _nc_STRCAT(buf, ", ", need); } else { for (n = 1; t_tbl[n].name != 0; n++)