From c3916416910a9c8007f57c30c8bf616fd5030962 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Wed, 24 Apr 2024 11:41:46 -0700 Subject: [PATCH] Eliminate warnings for ignored fprintf() result when printing messages to stderr --- src/common.c | 6 +++--- src/dlpi.c | 14 ++++++------- src/dspif.c | 8 ++++---- src/initsout.c | 2 +- src/ldeboot.c | 8 ++++---- src/ldsout.c | 16 +++++++-------- src/main.c | 54 +++++++++++++++++++++++++------------------------- src/perrno.c | 6 +++--- src/tstsout.c | 2 +- src/uraid.c | 6 +++--- src/vesainit.c | 4 ++-- src/vgainit.c | 2 +- src/vmemsave.c | 2 +- src/xmkicon.c | 4 ++-- src/xrdopt.c | 38 +++++++++++++++++------------------ 15 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/common.c b/src/common.c index 785941d2..06722d4f 100644 --- a/src/common.c +++ b/src/common.c @@ -64,14 +64,14 @@ LispPTR Uraid_mess = NIL; int error(const char *cp) { char *ptr; if (device_before_raid() < 0) { - fprintf(stderr, "Can't Enter URAID.\n"); + (void)fprintf(stderr, "Can't Enter URAID.\n"); exit(-1); } /* comm read */ URaid_errmess = cp; - fprintf(stderr, "\n*Error* %s\n", cp); + (void)fprintf(stderr, "\n*Error* %s\n", cp); fflush(stdin); - fprintf(stderr, "Enter the URaid\n"); + (void)fprintf(stderr, "Enter the URaid\n"); print(Uraid_mess); putchar('\n'); /* XXX: make sure output is flushed so we can see where we are */ diff --git a/src/dlpi.c b/src/dlpi.c index abeffd15..61b88abf 100644 --- a/src/dlpi.c +++ b/src/dlpi.c @@ -188,7 +188,7 @@ int setup_dlpi_dev(char *device) dlbindreq(fd, 0x0600, 0, DL_CLDLS, 0, 0); if (dlbindack(fd, buf) < 0) { - fprintf(stderr, "%s: dlbindack failed.\n", pname); + (void)fprintf(stderr, "%s: dlbindack failed.\n", pname); return (-1); } @@ -202,14 +202,14 @@ int setup_dlpi_dev(char *device) dlpromisconreq(fd, DL_PROMISC_SAP); if (dlokack(fd, buf) < 0) { - fprintf(stderr, "%s: DL_PROMISC_SAP failed.\n", pname); + (void)fprintf(stderr, "%s: DL_PROMISC_SAP failed.\n", pname); return (-1); } dlpromisconreq(fd, DL_PROMISC_MULTI); if (dlokack(fd, buf) < 0) { - fprintf(stderr, "%s: DL_PROMISC_MULTI failed.\n", pname); + (void)fprintf(stderr, "%s: DL_PROMISC_MULTI failed.\n", pname); return (-1); } @@ -329,8 +329,8 @@ int dlpi_devtype(int fd) case DL_FDDI: return (DLT_FDDI); #endif default: - fprintf(stderr, "%s: DLPI MACtype %ld unknown, ", pname, (long)dlp->info_ack.dl_mac_type); - fprintf(stderr, "assuming ethernet.\n"); + (void)fprintf(stderr, "%s: DLPI MACtype %ld unknown, ", pname, (long)dlp->info_ack.dl_mac_type); + (void)fprintf(stderr, "assuming ethernet.\n"); return (DLT_EN10MB); } } @@ -585,7 +585,7 @@ static int strgetmsg(int fd, struct strbuf *ctlp, struct strbuf *datap, int *fla /* * sigalrm - handle alarms. */ -static void sigalrm(int sig) { (void)fprintf(stderr, "dlpi: timeout\n"); } +static void sigalrm(int sig) { (void)(void)fprintf(stderr, "dlpi: timeout\n"); } /* * savestr - save string in dynamic memory. @@ -595,7 +595,7 @@ static char *savestr(char *s) char *t; if ((t = malloc(strlen(s) + 1)) == NULL) { - (void)fprintf(stderr, "%s: out of memory.\n", pname); + (void)(void)fprintf(stderr, "%s: out of memory.\n", pname); (void)exit(1); } diff --git a/src/dspif.c b/src/dspif.c index 808f8e3c..7f8ec498 100644 --- a/src/dspif.c +++ b/src/dspif.c @@ -59,8 +59,8 @@ void make_dsp_instance(DspInterface dsp, char *lispbitmap, int width_hint, int h } else if (VGA_p()) { VGA_init(dsp, 0, 0, 0, depth_hint); } else { /* Can't set *ANY* video mode! */ - (void)fprintf(stderr, "No portable graphics mode supported by this host.\n"); - (void)fprintf(stderr, "\n-Expected VESA or VGA.\n"); + (void)(void)fprintf(stderr, "No portable graphics mode supported by this host.\n"); + (void)(void)fprintf(stderr, "\n-Expected VESA or VGA.\n"); exit(1); } break; @@ -69,7 +69,7 @@ void make_dsp_instance(DspInterface dsp, char *lispbitmap, int width_hint, int h #elif XWINDOW /* lispbitmap is 0 when we call X_init the first time. */ if (X_init(dsp, 0, LispDisplayRequestedWidth, LispDisplayRequestedHeight, depth_hint) == NULL) { - fprintf(stderr, "Can't open display."); + (void)fprintf(stderr, "Can't open display."); exit(-1); } #endif /* DOS | XWINDOW */ @@ -87,7 +87,7 @@ void GenericReturnVoid(void *d) {(void)d; return; } void GenericPanic(void *d) { (void)d; TPRINT(("Enter GenericPanic\n")); - fprintf(stderr, "Panic! Call to uninitialized display slot!"); + (void)fprintf(stderr, "Panic! Call to uninitialized display slot!"); exit(0); } diff --git a/src/initsout.c b/src/initsout.c index ff4a6784..aed42612 100644 --- a/src/initsout.c +++ b/src/initsout.c @@ -124,7 +124,7 @@ void init_ifpage(unsigned sysout_size) { new_lastvmem = (sysout_size * PAGES_IN_MBYTE) - 1; if ((!Storage_expanded) && (InterfacePage->dllastvmempage != new_lastvmem)) { - fprintf(stderr, "You can't expand VMEM\n"); + (void)fprintf(stderr, "You can't expand VMEM\n"); exit(-1); } else { /* Set value which will be set to \\LASTVMEMFILEPAGE in LISP */ InterfacePage->dllastvmempage = new_lastvmem; diff --git a/src/ldeboot.c b/src/ldeboot.c index 88708e5d..e850ee1f 100644 --- a/src/ldeboot.c +++ b/src/ldeboot.c @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) { for (i = 1; i < argc; i++) { if ((strcmp(argv[i], "-d") == 0) || (strcmp(argv[i], "-display") == 0)) { if (i == argc - 1) { - fprintf(stderr, "Missing argument to -display option.\n"); + (void)fprintf(stderr, "Missing argument to -display option.\n"); exit(1); } displayName = argv[++i]; @@ -138,7 +138,7 @@ int main(int argc, char *argv[]) { filetorun = LDEX; goto run; } else { - fprintf(stderr, "Unable to open X11 display %s\n", + (void)fprintf(stderr, "Unable to open X11 display %s\n", displayName ? displayName : "from DISPLAY"); exit(1); } @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) { #ifdef USESUNSCREEN if ((FrameBufferFd = open("/dev/fb", O_RDWR)) < 0) { - fprintf(stderr, "lde: can't open FrameBuffer\n"); + (void)fprintf(stderr, "lde: can't open FrameBuffer\n"); exit(1); } if (ioctl(FrameBufferFd, FBIOGTYPE, &my_screen) < 0) { @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) { run: if (filetorun == NULL) { - fprintf(stderr, "Unable to determine what display program to run.\n"); + (void)fprintf(stderr, "Unable to determine what display program to run.\n"); exit(1); } diff --git a/src/ldsout.c b/src/ldsout.c index 5860a0a4..e9afd7ee 100644 --- a/src/ldsout.c +++ b/src/ldsout.c @@ -121,14 +121,14 @@ unsigned sysout_loader(const char *sysout_file_name, unsigned sys_size) { */ #ifndef NOVERSION if (ifpage.lversion < LVERSION) { - fprintf(stderr, "Lisp VM is too old for this emulator.\n"); - fprintf(stderr, "(version is %d, must be at least %d.)\n", ifpage.lversion, LVERSION); + (void)fprintf(stderr, "Lisp VM is too old for this emulator.\n"); + (void)fprintf(stderr, "(version is %d, must be at least %d.)\n", ifpage.lversion, LVERSION); exit(-1); } if (ifpage.minbversion > MINBVERSION) { - fprintf(stderr, "Emulator is too old for this Lisp VM.\n"); - fprintf(stderr, "(version is %d, must be at least %d.)\n", MINBVERSION, ifpage.minbversion); + (void)fprintf(stderr, "Emulator is too old for this Lisp VM.\n"); + (void)fprintf(stderr, "(version is %d, must be at least %d.)\n", MINBVERSION, ifpage.minbversion); exit(-1); } #endif /* NOVERSION */ @@ -157,9 +157,9 @@ unsigned sysout_loader(const char *sysout_file_name, unsigned sys_size) { /* Hence we have to observe the display protocol. */ VESA_errorexit(tmp); #else - fprintf(stderr, "sysout_loader: You can't specify the process size.\n"); - fprintf(stderr, "Because, secondary space is already used.\n"); - fprintf(stderr, "(size is %d, you specified %d.)\n", ifpage.process_size, sys_size); + (void)fprintf(stderr, "sysout_loader: You can't specify the process size.\n"); + (void)fprintf(stderr, "Because, secondary space is already used.\n"); + (void)fprintf(stderr, "(size is %d, you specified %d.)\n", ifpage.process_size, sys_size); exit(-1); #endif /* DOS */ } @@ -176,7 +176,7 @@ unsigned sysout_loader(const char *sysout_file_name, unsigned sys_size) { lispworld_scratch = mmap(0, sys_size * MBYTE, PROT_READ|PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); if (lispworld_scratch == MAP_FAILED) { - fprintf(stderr, "sysout_loader: can't allocate Lisp %dMBytes VM \n", sys_size); + (void)fprintf(stderr, "sysout_loader: can't allocate Lisp %dMBytes VM \n", sys_size); exit(-1); } diff --git a/src/main.c b/src/main.c index b6e05a8e..1d554dbe 100644 --- a/src/main.c +++ b/src/main.c @@ -364,7 +364,7 @@ int main(int argc, char *argv[]) } if (argv[i] && ((strcmp(argv[i], "-help") == 0) || (strcmp(argv[i], "-HELP") == 0))) { - fprintf(stderr, "%s%s", helpstring, nethubHelpstring); + (void)fprintf(stderr, "%s%s", helpstring, nethubHelpstring); exit(0); } @@ -387,7 +387,7 @@ int main(int argc, char *argv[]) } if (access(sysout_name, R_OK)) { perror("Couldn't find a sysout to run"); - fprintf(stderr, "%s%s", helpstring, nethubHelpstring); + (void)fprintf(stderr, "%s%s", helpstring, nethubHelpstring); exit(1); } /* OK, sysout name is now in sysout_name, and i is moved past a supplied name */ @@ -403,11 +403,11 @@ int main(int argc, char *argv[]) if (errno == 0 && tmpint > 0) { TIMER_INTERVAL = tmpint; } else { - fprintf(stderr, "Bad value for -t (integer > 0)\n"); + (void)fprintf(stderr, "Bad value for -t (integer > 0)\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -t\n"); + (void)fprintf(stderr, "Missing argument after -t\n"); exit(1); } } @@ -419,11 +419,11 @@ int main(int argc, char *argv[]) if (errno == 0 && tmpint > 0) { sysout_size = (unsigned)tmpint; } else { - fprintf(stderr, "Bad value for -m (integer > 0)\n"); + (void)fprintf(stderr, "Bad value for -m (integer > 0)\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -m\n"); + (void)fprintf(stderr, "Missing argument after -m\n"); exit(1); } } @@ -462,22 +462,22 @@ int main(int argc, char *argv[]) if (argc > ++i) { int read = sscanf(argv[i], "%dx%d", &width, &height); if(read != 2) { - fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]); + (void)fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]); exit(1); } } else { - fprintf(stderr, "Missing argument after -sc\n"); + (void)fprintf(stderr, "Missing argument after -sc\n"); exit(1); } } else if ((strcmp(argv[i], "-pixelscale") == 0) || (strcmp(argv[i], "-PIXELSCALE") == 0)) { if (argc > ++i) { int read = sscanf(argv[i], "%d", &pixelscale); if(read != 1) { - fprintf(stderr, "Could not parse -pixelscale argument %s\n", argv[i]); + (void)fprintf(stderr, "Could not parse -pixelscale argument %s\n", argv[i]); exit(1); } } else { - fprintf(stderr, "Missing argument after -pixelscale\n"); + (void)fprintf(stderr, "Missing argument after -pixelscale\n"); exit(1); } } else if ((strcmp(argv[i], "-t") == 0) || (strcmp(argv[i], "-T") == 0) @@ -485,7 +485,7 @@ int main(int argc, char *argv[]) if (argc > ++i) { windowtitle = argv[i]; } else { - fprintf(stderr, "Missing argument after -title\n"); + (void)fprintf(stderr, "Missing argument after -title\n"); exit(1); } } @@ -511,7 +511,7 @@ int main(int argc, char *argv[]) ether_host[4] = b4; ether_host[5] = b5; } else { - fprintf(stderr, "Missing or bogus -E argument\n"); + (void)fprintf(stderr, "Missing or bogus -E argument\n"); ether_fd = -1; exit(1); } @@ -524,7 +524,7 @@ int main(int argc, char *argv[]) if (argc > ++i) { setNethubHost(argv[i]); } else { - fprintf(stderr, "Missing argument after -nh-host\n"); + (void)fprintf(stderr, "Missing argument after -nh-host\n"); exit(1); } } @@ -535,11 +535,11 @@ int main(int argc, char *argv[]) if (errno == 0 && tmpint > 0) { setNethubPort(tmpint); } else { - fprintf(stderr, "Bad value for -nh-port\n"); + (void)fprintf(stderr, "Bad value for -nh-port\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -nh-port\n"); + (void)fprintf(stderr, "Missing argument after -nh-port\n"); exit(1); } } @@ -549,11 +549,11 @@ int main(int argc, char *argv[]) if (sscanf(argv[i], "%x-%x-%x-%x-%x-%x", &b0, &b1, &b2, &b3, &b4, &b5) == 6) { setNethubMac(b0, b1, b2, b3, b4, b5); } else { - fprintf(stderr, "Invalid argument for -nh-mac\n"); + (void)fprintf(stderr, "Invalid argument for -nh-mac\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -nh-mac\n"); + (void)fprintf(stderr, "Missing argument after -nh-mac\n"); exit(1); } } @@ -564,11 +564,11 @@ int main(int argc, char *argv[]) if (errno == 0 && tmpint >= 0) { setNethubLogLevel(tmpint); } else { - fprintf(stderr, "Bad value for -nh-loglevel\n"); + (void)fprintf(stderr, "Bad value for -nh-loglevel\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -nh-loglevel\n"); + (void)fprintf(stderr, "Missing argument after -nh-loglevel\n"); exit(1); } } @@ -582,11 +582,11 @@ int main(int argc, char *argv[]) if (errno == 0 && tmpint > 1000) { insnsCountdownForTimerAsyncEmulation = tmpint; } else { - fprintf(stderr, "Bad value for -intr-emu-insns (integer > 1000)\n"); + (void)fprintf(stderr, "Bad value for -intr-emu-insns (integer > 1000)\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -intr-emu-insns\n"); + (void)fprintf(stderr, "Missing argument after -intr-emu-insns\n"); exit(1); } } @@ -600,11 +600,11 @@ int main(int argc, char *argv[]) if (errno == 0 && tmpint > 0) { maxpages = (unsigned)tmpint; } else { - fprintf(stderr, "Bad value for -xpages (integer > 0)\n"); + (void)fprintf(stderr, "Bad value for -xpages (integer > 0)\n"); exit(1); } } else { - fprintf(stderr, "Missing argument after -xpages\n"); + (void)fprintf(stderr, "Missing argument after -xpages\n"); exit(1); } } @@ -615,9 +615,9 @@ int main(int argc, char *argv[]) probemouse(); /* See if the mouse is connected. */ #else if (getuid() != geteuid()) { - fprintf(stderr, "Effective user is not real user. Resetting uid\n"); + (void)fprintf(stderr, "Effective user is not real user. Resetting uid\n"); if (setuid(getuid()) == -1) { - fprintf(stderr, "Unable to reset user id to real user id\n"); + (void)fprintf(stderr, "Unable to reset user id to real user id\n"); exit(1); } } @@ -641,7 +641,7 @@ int main(int argc, char *argv[]) if (FindUnixPipes()) /* must call the routine to allocate storage, */ { /* in case we're re-starting a savevm w/open ptys */ - if (please_fork) fprintf(stderr, "Failed to find UNIXCOMM file handles; no processes\n"); + if (please_fork) (void)fprintf(stderr, "Failed to find UNIXCOMM file handles; no processes\n"); } #endif /* DOS */ @@ -665,7 +665,7 @@ int main(int argc, char *argv[]) /* file system directory enumeration stuff */ if (!init_finfo()) { - fprintf(stderr, "Cannot allocate internal data.\n"); + (void)fprintf(stderr, "Cannot allocate internal data.\n"); exit(1); } #ifdef RS232 diff --git a/src/perrno.c b/src/perrno.c index c7aa4c50..b2ed83fa 100644 --- a/src/perrno.c +++ b/src/perrno.c @@ -25,8 +25,8 @@ /************************************************************************/ void perrorn(char *s, int n) { - if (s != NULL && *s != '\0') { fprintf(stderr, "%s: ", s); } - fprintf(stderr, "%s\n", strerror(n)); + if (s != NULL && *s != '\0') { (void)fprintf(stderr, "%s: ", s); } + (void)fprintf(stderr, "%s\n", strerror(n)); } /************************************************************************/ @@ -42,7 +42,7 @@ void err_mess(char *from, int no) { int save_errno = errno; /* Save errno around OSMESSAGE_PRINT */ OSMESSAGE_PRINT({ - fprintf(stderr, "System call error: %s errno=%d ", from, no); + (void)fprintf(stderr, "System call error: %s errno=%d ", from, no); perror(""); }); diff --git a/src/tstsout.c b/src/tstsout.c index 2e9a0808..03b41156 100644 --- a/src/tstsout.c +++ b/src/tstsout.c @@ -73,7 +73,7 @@ void check_sysout(char *sysout_file_name, int verbose) { } void usage(char *prog) { - fprintf(stderr, "Usage: %s [-v] sysout-filename\n", prog); + (void)fprintf(stderr, "Usage: %s [-v] sysout-filename\n", prog); exit(-1); } diff --git a/src/uraid.c b/src/uraid.c index 3b311b8d..abf2e492 100644 --- a/src/uraid.c +++ b/src/uraid.c @@ -776,7 +776,7 @@ LispPTR uraid_commands(void) { break; case 's': /* SHELL */ switch (vfork()) { - case -1: (void)fprintf(stderr, "uraid: Fork failed.\n"); exit(1); + case -1: (void)(void)fprintf(stderr, "uraid: Fork failed.\n"); exit(1); case 0: (void)execl("/bin/sh", "sh", "-i", NULL); exit(1); @@ -903,7 +903,7 @@ char *alloc_hideDISP(int size) { case SFS_NOTSWITCHABLE : if((retaddr =malloc(size)) ==0){ - fprintf(stderr,"can't alloc hide space\n"); + (void)fprintf(stderr,"can't alloc hide space\n"); } break; case 0 : @@ -927,7 +927,7 @@ char *alloc_hideDISP(int size) printf("Hidespace inside Lisp(4)\n"); } else if((retaddr=malloc(size)) ==0){ - fprintf(stderr,"can't alloc hide disp\n"); + (void)fprintf(stderr,"can't alloc hide disp\n"); } printf("Hidespace new\n"); break; diff --git a/src/vesainit.c b/src/vesainit.c index 3c24827d..e531df28 100644 --- a/src/vesainit.c +++ b/src/vesainit.c @@ -235,7 +235,7 @@ void VESA_enter(DspInterface dsp) if (VESA_describemode(dsp->graphicsmode) != 0) { _setvideomode(_DEFAULTMODE); _clearscreen(_GCLEARSCREEN); - fprintf(stderr, "Can't set VESA mode %o.\n", dsp->graphicsmode); + (void)fprintf(stderr, "Can't set VESA mode %o.\n", dsp->graphicsmode); exit(0); } /* Get the segaddr. An addr. is a seg shifted 4 bits! */ @@ -326,7 +326,7 @@ VESA_errorexit(char *s, int errno) { _setvideomode(_DEFAULTMODE); _clearscreen(_GCLEARSCREEN); - fprintf(stderr, s); + (void)fprintf(stderr, s); fflush(stderr); exit(errno); } diff --git a/src/vgainit.c b/src/vgainit.c index b00cca4c..03619fdd 100644 --- a/src/vgainit.c +++ b/src/vgainit.c @@ -34,7 +34,7 @@ void VGA_setmax(DspInterface dsp) struct videoconfig vc; if (!_setvideomode(_MAXRESMODE)) { - fprintf(stderr, "Can't set graphics mode.\n"); + (void)fprintf(stderr, "Can't set graphics mode.\n"); exit(1); } _getvideoconfig(&vc); diff --git a/src/vmemsave.c b/src/vmemsave.c index a031b63d..3ea6f09f 100644 --- a/src/vmemsave.c +++ b/src/vmemsave.c @@ -487,7 +487,7 @@ LispPTR vmem_save(char *sysout_file_name) TIMEOUT(rval = rename(tempname, sysout_file_name)); if (rval == -1) { - fprintf(stderr, "sysout is saved to temp file, %s.", tempname); + (void)fprintf(stderr, "sysout is saved to temp file, %s.", tempname); return (FILECANNOTWRITE); } diff --git a/src/xmkicon.c b/src/xmkicon.c index ef313e83..20c4a485 100644 --- a/src/xmkicon.c +++ b/src/xmkicon.c @@ -136,8 +136,8 @@ Pixmap make_Xicon(DspInterface dsp) Lisp_icon_height); } else if (value == BitmapFileInvalid) - fprintf(stderr, "Iconpixmapfile %s contains invalid bitmap data\n", iconpixmapfile); + (void)fprintf(stderr, "Iconpixmapfile %s contains invalid bitmap data\n", iconpixmapfile); else if (value == BitmapNoMemory) - fprintf(stderr, "Not enough memory to allocate icon pixmap\n"); + (void)fprintf(stderr, "Not enough memory to allocate icon pixmap\n"); return (IconPixmap); } /* end make_Xicon */ diff --git a/src/xrdopt.c b/src/xrdopt.c index 3759ea6e..8f1c3c5c 100644 --- a/src/xrdopt.c +++ b/src/xrdopt.c @@ -110,29 +110,29 @@ extern struct sockaddr_nit snit; void print_Xusage(const char *prog) { - fprintf(stderr, " %s options:\n", prog); - fprintf(stderr, " [-sysout] [] -path to the Medley image\n"); - fprintf(stderr, " -h[elp] -prints this text\n"); - fprintf(stderr, " -info -prints configuration info\n"); - fprintf(stderr, " -d[isplay] :.\n"); - fprintf(stderr, + (void)fprintf(stderr, " %s options:\n", prog); + (void)fprintf(stderr, " [-sysout] [] -path to the Medley image\n"); + (void)fprintf(stderr, " -h[elp] -prints this text\n"); + (void)fprintf(stderr, " -info -prints configuration info\n"); + (void)fprintf(stderr, " -d[isplay] :.\n"); + (void)fprintf(stderr, " -g[eometry] -size & placement for the medley window on your X " "screen\n"); - fprintf(stderr, + (void)fprintf(stderr, " -sc[reen] -size & placement for the medley display\n"); - fprintf(stderr, " -t[itle] -titlebar text for the window manager\n"); - fprintf(stderr, " -icontitle | -it -text for the medley icon\n"); - fprintf(stderr, " -iconbitmap | -ibm -bitmap for the medley icon\n"); - fprintf(stderr, + (void)fprintf(stderr, " -t[itle] -titlebar text for the window manager\n"); + (void)fprintf(stderr, " -icontitle | -it -text for the medley icon\n"); + (void)fprintf(stderr, " -iconbitmap | -ibm -bitmap for the medley icon\n"); + (void)fprintf(stderr, " -xsync -turn XSynchronize on. (default is off)\n\n"); #if defined(MAIKO_ENABLE_NETHUB) - fprintf(stderr,"\ + (void)fprintf(stderr,"\ -nh-host dodo-host Hostname for Dodo Nethub (no networking if missing)\n\ -nh-port port-number Port for Dodo Nethub (optional, default: 3333)\n\ -nh-mac XX-XX-XX-XX-XX-XX Machine-ID for Maiko-VM (optional, default: CA-FF-EE-12-34-56) \n\ -nh-loglevel level Loglevel for Dodo networking (0..2, optional, default: 0)\n\n"); #endif - fprintf(stderr, "Please refer to the manual for further information.\n\n"); + (void)fprintf(stderr, "Please refer to the manual for further information.\n\n"); exit(EXIT_FAILURE); } /* end print_Xusage() */ @@ -206,9 +206,9 @@ void read_Xoption(int *argc, char *argv[]) if (XrmGetResource(commandlineDB, "ldex.display", "Ldex.Display", str_type, &value) == True) { (void)strncpy(Display_Name, value.addr, value.size); } else if (getenv("DISPLAY") == (char *)NULL) { - fprintf(stderr, "Can't find a display. Either set the shell\n"); - fprintf(stderr, "variable DISPLAY to an appropriate display\n"); - fprintf(stderr, "or provide a -display argument.\n"); + (void)fprintf(stderr, "Can't find a display. Either set the shell\n"); + (void)fprintf(stderr, "variable DISPLAY to an appropriate display\n"); + (void)fprintf(stderr, "or provide a -display argument.\n"); print_Xusage(argv[0]); } else { envname = getenv("DISPLAY"); @@ -228,7 +228,7 @@ void read_Xoption(int *argc, char *argv[]) } XCloseDisplay(xdisplay); } else { - fprintf(stderr, "Open_Display: cannot connect to display %s.", XDisplayName(Display_Name)); + (void)fprintf(stderr, "Open_Display: cannot connect to display %s.", XDisplayName(Display_Name)); exit(-1); } @@ -248,7 +248,7 @@ void read_Xoption(int *argc, char *argv[]) (void)strncpy(sysout_name, value.addr, value.size); } if (sysout_name[0] == '\0') { - fprintf(stderr, "Couldn't find a sysout to run;\n"); + (void)fprintf(stderr, "Couldn't find a sysout to run;\n"); print_Xusage(argv[0]); } @@ -329,7 +329,7 @@ void read_Xoption(int *argc, char *argv[]) ether_host[4] = b4; ether_host[5] = b5; } else { - fprintf(stderr, "Missing or bogus -E argument\n"); + (void)fprintf(stderr, "Missing or bogus -E argument\n"); ether_fd = -1; exit(1); }