]> granicus.if.org Git - nethack/commitdiff
'curses_display_nhmenu' should return a value
authornhmall <nhmall@nethack.org>
Sun, 2 Dec 2018 23:47:23 +0000 (18:47 -0500)
committernhmall <nhmall@nethack.org>
Sun, 2 Dec 2018 23:47:23 +0000 (18:47 -0500)
Caught by automated build test

../win/curses/cursdial.c:598:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
        ^
../win/curses/cursdial.c:605:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;

win/curses/cursdial.c

index 829836fd4a3cb3e720d24503d58bf312e7b8ed66..99e5eb8308390b8bca81b573ddcbea3c4c3f9acf 100644 (file)
@@ -595,14 +595,14 @@ curses_display_nhmenu(winid wid, int how, MENU_ITEM_P ** _selected)
 
     if (current_menu == NULL) {
         impossible("curses_display_nhmenu: attempt to display nonexistent menu");
-        return;
+        return '\033';
     }
 
     menu_item_ptr = current_menu->entries;
 
     if (menu_item_ptr == NULL) {
         impossible("curses_display_nhmenu: attempt to display empty menu");
-        return;
+        return '\033';
     }
 
     /* Reset items to unselected to clear out selections from previous