use computed values in src/gtx/curseswindows.c
authorChristof Hanke <christof.hanke@rzg.mpg.de>
Sun, 21 Nov 2010 19:09:23 +0000 (20:09 +0100)
committerDerrick Brashear <shadow@dementia.org>
Sun, 21 Nov 2010 21:42:42 +0000 (13:42 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/gtx/curseswindows.c

index 5d1d5e0..e1796d5 100644 (file)
@@ -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 */