From fc6543c0f9292880180531d656e80c903e8e7dfd Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 5 Feb 2023 10:22:09 -0800 Subject: Stop casting function returns to void This was used with old versions of lint to stop warnings about unused return values. Signed-off-by: Alan Coopersmith --- math.c | 10 +++++----- xcalc.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/math.c b/math.c index 6e46692..c51517c 100644 --- a/math.c +++ b/math.c @@ -102,15 +102,15 @@ parse_double(double *dp) switch (numbase) { case 8: - (void)sscanf(dispstr, "%lo", &n); + sscanf(dispstr, "%lo", &n); *dp = (double)n; break; case 16: - (void)sscanf(dispstr, "%lX", &n); + sscanf(dispstr, "%lX", &n); *dp = (double)n; break; default: - (void)sscanf(dispstr, "%lf", dp); + sscanf(dispstr, "%lf", dp); } errno = olderrno; @@ -490,7 +490,7 @@ twoop(int keynum) if (!entered) { /* something like "5+*" */ if (!isopempty()) - (void) PopOp(); /* replace the prev op */ + PopOp(); /* replace the prev op */ PushOp(keynum); /* with the new one */ return; } @@ -734,7 +734,7 @@ rparf(void) dnum=acc; PushNum(dnum); } - (void) PopNum(); + PopNum(); flagPAREN--; entered=2; format_double(dnum); diff --git a/xcalc.c b/xcalc.c index 93e55c5..34fef53 100644 --- a/xcalc.c +++ b/xcalc.c @@ -151,7 +151,7 @@ main(int argc, char **argv) dpy = XtDisplay(toplevel); wm_delete_window = XInternAtom(dpy, "WM_DELETE_WINDOW", False); - (void) XSetWMProtocols(dpy, XtWindow(toplevel), &wm_delete_window, 1); + XSetWMProtocols(dpy, XtWindow(toplevel), &wm_delete_window, 1); XDefineCursor(dpy, XtWindow(toplevel), appResources.cursor); if (appResources.stipple || (CellsOfScreen(XtScreen(toplevel)) <= 2)) @@ -325,15 +325,15 @@ void Quit(void) */ static void Syntax(int argc, char **argv) { - (void) fprintf(stderr, "%s: unknown options:", argv[0]); + fprintf(stderr, "%s: unknown options:", argv[0]); for (int i = 1; i