From: Christof Hanke Date: Sun, 21 Nov 2010 19:09:23 +0000 (+0100) Subject: use computed values in src/gtx/curseswindows.c X-Git-Tag: openafs-devel-1_7_1~1230 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=03ab065e0ccf291d45a93b7d63c022bcad3aac34 use computed values in src/gtx/curseswindows.c compiling failed, because of -Wunused-value. Use the return code of wstandout and wstandend and pass it upwards. Change-Id: I6ae101edb36e31247ff772f5dc59104eb7856138 Reviewed-on: http://gerrit.openafs.org/3344 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/gtx/curseswindows.c b/src/gtx/curseswindows.c index 5d1d5e0..e1796d5 100644 --- a/src/gtx/curseswindows.c +++ b/src/gtx/curseswindows.c @@ -578,6 +578,7 @@ gator_cursesgwin_drawchar(struct gwin *gwp, struct gwin_charparams *params) static char rn[] = "gator_cursesgwin_drawchar"; /*Routine name */ struct gator_cursesgwin *cwp; /*Ptr to curses private area */ int curses_x, curses_y; /*Mapped x,y positions */ + int code=0; cwp = (struct gator_cursesgwin *)(gwp->w_data); curses_x = GATOR_MAP_X_TO_COL(cwp, params->x); @@ -589,10 +590,14 @@ gator_cursesgwin_drawchar(struct gwin *gwp, struct gwin_charparams *params) curses_x, (params->highlight ? ", using standout mode" : "")); wmove(cwp->wp, curses_y, curses_x); if (params->highlight) - wstandout(cwp->wp); + code=wstandout(cwp->wp); + if (code) + return (code); waddch(cwp->wp, params->c); if (params->highlight) - wstandend(cwp->wp); + code=wstandend(cwp->wp); + if (code) + return (code); return (0); @@ -627,6 +632,7 @@ gator_cursesgwin_drawstring(struct gwin *gwp, struct gwin_strparams *params) static char rn[] = "gator_cursesgwin_drawstring"; /*Routine name */ struct gator_cursesgwin *cwp; /*Ptr to curses private area */ int curses_x, curses_y; /*Mapped x,y positions */ + int code=0; cwp = (struct gator_cursesgwin *)(gwp->w_data); curses_x = GATOR_MAP_X_TO_COL(cwp, params->x); @@ -638,12 +644,16 @@ gator_cursesgwin_drawstring(struct gwin *gwp, struct gwin_strparams *params) curses_x, (params->highlight ? ", using standout mode" : "")); wmove(cwp->wp, curses_y, curses_x); if (params->highlight) - wstandout(cwp->wp); + code=wstandout(cwp->wp); + if (code) + return (code); waddstr(cwp->wp, params->s); if (params->highlight) - wstandend(cwp->wp); + code=wstandend(cwp->wp); + if (code) + return (code); - return (0); + return (code); } /*gator_cursesgwin_drawstring */