From: PatR Date: Thu, 3 Mar 2022 13:38:34 +0000 (-0800) Subject: raw_print() usage X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0326b77a1882bc758fc85aa0b14f2b9054e80c9e;p=nethack raw_print() usage Get rid of a couple of mis-formatted casts in lock_file(). raw_print() is declared as void so casting its result to (void) was pointless. Presumeably at one point it has used printf() or fprintf(stderr,...) where the cast would have been useful to pacify 'lint'. --- diff --git a/src/files.c b/src/files.c index 628f6f58f..715d7fa40 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 files.c $NHDT-Date: 1646255374 2022/03/02 21:09:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.345 $ */ +/* NetHack 3.7 files.c $NHDT-Date: 1646314650 2022/03/03 13:37:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.346 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1805,7 +1805,7 @@ lock_file(const char *filename, int whichprefix, int retryct) filename, retryct); sleep(1); } else { - HUP(void) raw_print("I give up. Sorry."); + HUP raw_print("I give up. Sorry."); HUP raw_printf("Some other process has an unnatural grip on %s.", filename); g.nesting--; @@ -1817,15 +1817,14 @@ lock_file(const char *filename, int whichprefix, int retryct) switch (errnosv) { /* George Barbanis */ case EEXIST: if (retryct--) { - HUP raw_printf( - "Waiting for access to %s. (%d retries left).", filename, - retryct); + HUP raw_printf("Waiting for access to %s. (%d retries left).", + filename, retryct); #if defined(SYSV) || defined(ULTRIX) || defined(VMS) (void) #endif sleep(1); } else { - HUP(void) raw_print("I give up. Sorry."); + HUP raw_print("I give up. Sorry."); HUP raw_printf("Perhaps there is an old %s around?", lockname); g.nesting--;