From 84fccf150f58fa620a4f93f497e80616d4184ed6 Mon Sep 17 00:00:00 2001 From: Christof Hanke Date: Sun, 21 Nov 2010 20:09:23 +0100 Subject: [PATCH] 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. Reviewed-on: http://gerrit.openafs.org/3344 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 03ab065e0ccf291d45a93b7d63c022bcad3aac34) Change-Id: I4623ba9c00ea19b33d73831f6f11ba2d2e32b1a0 Reviewed-on: http://gerrit.openafs.org/3511 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/gtx/curseswindows.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gtx/curseswindows.c b/src/gtx/curseswindows.c index 5d1d5e06c..e1796d5c6 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 */ -- 2.39.5