X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fclient%2Fwindows.c;h=a9bea11c00c9ac04053ef3bb4fc7eb65399e60cc;hb=3a31142e9b3428ecaac3387ab81c1f9b7490051e;hp=763178bf596465660b1f2ea4fa084504e7a12092;hpb=0907037fc188c28471805286a67b786264ba3e2f;p=plomrogue diff --git a/src/client/windows.c b/src/client/windows.c index 763178b..a9bea11 100644 --- a/src/client/windows.c +++ b/src/client/windows.c @@ -51,7 +51,7 @@ static void init_win_size_from_winconf_and_v_screen_size(char id); * match_func() is just a little helper to it. */ static uint8_t match_func(char c, void (** f) (), char c_m, void (* f_m) ()); -static void * get_drawfunc_by_char(char c); +static void (* get_drawfunc_by_char(char c)) (); /* Write "win"'s size back to .target_(height/width) as per .target_*_type. */ static void set_win_target_size(struct Win * win); @@ -170,7 +170,7 @@ static uint8_t match_func(char c, void (** f) (), char c_m, void (* f_m) ()) -static void * get_drawfunc_by_char(char c) +static void (* get_drawfunc_by_char(char c)) () { void (* f) (struct Win *) = NULL; if ( match_func(c, &f, 'c', draw_win_inventory) @@ -180,7 +180,10 @@ static void * get_drawfunc_by_char(char c) || match_func(c, &f, 'm', draw_win_map) || match_func(c, &f, '0', draw_win_keybindings_global) || match_func(c, &f, '1', draw_win_keybindings_winconf_geometry) - || match_func(c, &f, '2', draw_win_keybindings_winconf_keybindings)); + || match_func(c, &f, '2', draw_win_keybindings_winconf_keybindings)) + { + ; + } return f; } @@ -240,7 +243,7 @@ static void refit_v_screen() /* Only resize .v_screen if the rightmost window column has changed. */ char * err_s = "refit_v_screen() grows virtual screen beyond legal sizes."; char * err_m = "refit_v_screen() triggers memory alloc error in wresize()."; - if (getmaxx(world.winDB.v_screen) + 1 != lastwcol) + if ((uint32_t) getmaxx(world.winDB.v_screen) + 1 != lastwcol) { uint8_t t = (lastwcol + 2 > UINT16_MAX); exit_err(t, err_s); @@ -502,7 +505,7 @@ static void draw_wins(struct Win * w) struct Win * next = get_win_after(w->id); if (next) { - return draw_wins(next); + draw_wins(next); } } @@ -750,7 +753,7 @@ extern void free_winDB() -extern void winch_called(int signal) +extern void winch_called() { world.winch = 1; }