From ff790e47f2de6f4d6d48148e1d5a67da8e93c446 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Wed, 22 Jun 2005 15:44:37 +0000 Subject: [PATCH] Insert a lot of missing (void) casts. --- doc/doc-txt/ChangeLog | 8 +++++++- src/src/bmi_spam.c | 4 ++-- src/src/daemon.c | 8 ++++---- src/src/dbfn.c | 4 ++-- src/src/deliver.c | 20 ++++++++++---------- src/src/directory.c | 6 +++--- src/src/exim_dbutil.c | 6 +++--- src/src/exim_lock.c | 8 ++++---- src/src/expand.c | 6 +++--- src/src/host.c | 8 ++++---- src/src/log.c | 6 +++--- src/src/receive.c | 6 +++--- src/src/spam.c | 4 ++-- src/src/spool_in.c | 16 ++++++++-------- src/src/spool_out.c | 6 +++--- src/src/transport.c | 6 +++--- src/src/transports/appendfile.c | 26 +++++++++++++------------- 17 files changed, 77 insertions(+), 71 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index da19c704a..14741664e 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.168 2005/06/22 14:45:05 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.169 2005/06/22 15:44:37 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -181,6 +181,12 @@ PH/25 Put debug statements on either side of calls to EXIM_DBOPEN() for hints DB library. This is a regular occurrence (often caused by mis-matched db.h files). +PH/26 Insert a lot of missing (void) casts for functions such as chown(), + chmod(), fcntl(), and sscanf(). These were picked up on a user's system + that detects such things. There doesn't seem to be a gcc warning option + for this - only an attribute that has to be put on the function's + prototype. I'm sure I haven't caught all of these, but it's a start. + Exim version 4.51 ----------------- diff --git a/src/src/bmi_spam.c b/src/src/bmi_spam.c index b8b9051b6..8c3bb6f6a 100644 --- a/src/src/bmi_spam.c +++ b/src/src/bmi_spam.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/bmi_spam.c,v 1.3 2005/02/17 11:58:25 ph10 Exp $ */ +/* $Cambridge: exim/src/src/bmi_spam.c,v 1.4 2005/06/22 15:44:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -453,7 +453,7 @@ int bmi_check_rule(uschar *base64_verdict, uschar *option_list) { int rule_int = -1; /* try to translate to int */ - sscanf(rule_num, "%d", &rule_int); + (void)sscanf(rule_num, "%d", &rule_int); if (rule_int > 0) { debug_printf("checking rule #%d\n", rule_int); /* check if rule fired on the message */ diff --git a/src/src/daemon.c b/src/src/daemon.c index 974785c24..fb74d83f2 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/daemon.c,v 1.11 2005/06/21 14:14:55 ph10 Exp $ */ +/* $Cambridge: exim/src/src/daemon.c,v 1.12 2005/06/22 15:44:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1417,9 +1417,9 @@ if (running_in_test_harness || write_pid) f = Ufopen(pid_file_path, "wb"); if (f != NULL) { - fprintf(f, "%d\n", (int)getpid()); - fchmod(fileno(f), 0644); - fclose(f); + (void)fprintf(f, "%d\n", (int)getpid()); + (void)fchmod(fileno(f), 0644); + (void)fclose(f); DEBUG(D_any) debug_printf("pid written to %s\n", pid_file_path); } else diff --git a/src/src/dbfn.c b/src/src/dbfn.c index 36110f3e9..53f2212ac 100644 --- a/src/src/dbfn.c +++ b/src/src/dbfn.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/dbfn.c,v 1.4 2005/06/22 14:45:05 ph10 Exp $ */ +/* $Cambridge: exim/src/src/dbfn.c,v 1.5 2005/06/22 15:44:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -206,7 +206,7 @@ if (created && geteuid() == root_uid) if (Ustat(buffer, &statbuf) >= 0 && statbuf.st_uid != exim_uid) { DEBUG(D_hints_lookup) debug_printf("ensuring %s is owned by exim\n", buffer); - Uchown(buffer, exim_uid, exim_gid); + (void)Uchown(buffer, exim_uid, exim_gid); } } } diff --git a/src/src/deliver.c b/src/src/deliver.c index 2568c9770..a026ec65a 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/deliver.c,v 1.18 2005/06/16 14:10:13 ph10 Exp $ */ +/* $Cambridge: exim/src/src/deliver.c,v 1.19 2005/06/22 15:44:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -286,7 +286,7 @@ doesn't always get set automatically. */ if (fd >= 0) { - fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); + (void)fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); if (fchown(fd, exim_uid, exim_gid) < 0) { *error = US"chown"; @@ -1729,7 +1729,7 @@ if ((pid = fork()) == 0) gid/uid. */ close(pfd[pipe_read]); - fcntl(pfd[pipe_write], F_SETFD, fcntl(pfd[pipe_write], F_GETFD) | + (void)fcntl(pfd[pipe_write], F_SETFD, fcntl(pfd[pipe_write], F_GETFD) | FD_CLOEXEC); exim_setugid(uid, gid, use_initgroups, string_sprintf("local delivery to %s <%s> transport=%s", addr->local_part, @@ -3673,9 +3673,9 @@ for (delivery_count = 0; addr_remote != NULL; delivery_count++) distinguishes between EOF and no-more-data. */ #ifdef O_NONBLOCK - fcntl(pfd[pipe_read], F_SETFL, O_NONBLOCK); + (void)fcntl(pfd[pipe_read], F_SETFL, O_NONBLOCK); #else - fcntl(pfd[pipe_read], F_SETFL, O_NDELAY); + (void)fcntl(pfd[pipe_read], F_SETFL, O_NDELAY); #endif /* If the maximum number of subprocesses already exist, wait for a process @@ -3748,7 +3748,7 @@ for (delivery_count = 0; addr_remote != NULL; delivery_count++) a new process that may be forked to do another delivery down the same SMTP connection. */ - fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); + (void)fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); /* Close open file descriptors for the pipes of other processes that are running in parallel. */ @@ -3775,7 +3775,7 @@ for (delivery_count = 0; addr_remote != NULL; delivery_count++) /* Set the close-on-exec flag */ - fcntl(deliver_datafile, F_SETFD, fcntl(deliver_datafile, F_GETFD) | + (void)fcntl(deliver_datafile, F_SETFD, fcntl(deliver_datafile, F_GETFD) | FD_CLOEXEC); /* Set the uid/gid of this process; bombs out on failure. */ @@ -5845,9 +5845,9 @@ if (addr_local != NULL || addr_remote != NULL) that the mode is correct - the group setting doesn't always seem to get set automatically. */ - fcntl(journal_fd, F_SETFD, fcntl(journal_fd, F_GETFD) | FD_CLOEXEC); - fchown(journal_fd, exim_uid, exim_gid); - fchmod(journal_fd, SPOOL_MODE); + (void)fcntl(journal_fd, F_SETFD, fcntl(journal_fd, F_GETFD) | FD_CLOEXEC); + (void)fchown(journal_fd, exim_uid, exim_gid); + (void)fchmod(journal_fd, SPOOL_MODE); } diff --git a/src/src/directory.c b/src/src/directory.c index a3a24a5da..ad15ae88e 100644 --- a/src/src/directory.c +++ b/src/src/directory.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/directory.c,v 1.2 2005/01/04 10:00:42 ph10 Exp $ */ +/* $Cambridge: exim/src/src/directory.c,v 1.3 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -74,13 +74,13 @@ while (c != 0 && *p != 0) /* Set the ownership if necessary. */ - if (use_chown) Uchown(buffer, exim_uid, exim_gid); + if (use_chown) (void)Uchown(buffer, exim_uid, exim_gid); /* It appears that any mode bits greater than 0777 are ignored by mkdir(), at least on some operating systems. Therefore, if the mode contains any such bits, do an explicit mode setting. */ - if ((mode & 0777000) != 0) Uchmod(buffer, mode); + if ((mode & 0777000) != 0) (void)Uchmod(buffer, mode); } *p++ = c; } diff --git a/src/src/exim_dbutil.c b/src/src/exim_dbutil.c index 03c00a411..5e00eaea8 100644 --- a/src/src/exim_dbutil.c +++ b/src/src/exim_dbutil.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/exim_dbutil.c,v 1.5 2005/06/14 10:32:01 ph10 Exp $ */ +/* $Cambridge: exim/src/src/exim_dbutil.c,v 1.6 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -775,12 +775,12 @@ for(;;) printf("No previous record name is set\n"); continue; } - sscanf(CS buffer, "%s %s", field, value); + (void)sscanf(CS buffer, "%s %s", field, value); } else { name[0] = 0; - sscanf(CS buffer, "%s %s %s", name, field, value); + (void)sscanf(CS buffer, "%s %s %s", name, field, value); } /* Handle an update request */ diff --git a/src/src/exim_lock.c b/src/src/exim_lock.c index 15f0d285c..9b5b26209 100644 --- a/src/src/exim_lock.c +++ b/src/src/exim_lock.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/exim_lock.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */ +/* $Cambridge: exim/src/src/exim_lock.c,v 1.2 2005/06/22 15:44:38 ph10 Exp $ */ /* A program to lock a file exactly as Exim would, for investigation of interlocking problems. @@ -439,7 +439,7 @@ for (j = 0; j < lock_retries; j++) goto CLEAN_UP; } - chmod (tempname, 0600); + (void)chmod(tempname, 0600); if (apply_lock(md, F_WRLCK, use_fcntl, lock_fcntl_timeout, use_flock, lock_flock_timeout) >= 0) @@ -551,12 +551,12 @@ if (restore_times) struct stat strestore; struct utimbuf ut; stat(filename, &strestore); - system(command); + (void)system(command); ut.actime = strestore.st_atime; ut.modtime = strestore.st_mtime; utime(filename, &ut); } -else system(command); +else (void)system(command); /* Remove the locks and exit. Unlink the /tmp file if we can get an exclusive lock on the mailbox. This should be a non-blocking lock call, as there is no diff --git a/src/src/expand.c b/src/src/expand.c index 80971cb26..ca340bb1b 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/expand.c,v 1.34 2005/06/22 10:17:23 ph10 Exp $ */ +/* $Cambridge: exim/src/src/expand.c,v 1.35 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -3438,8 +3438,8 @@ while (*s != 0) uschar *now = prvs_daystamp(0); unsigned int inow = 0,iexpire = 1; - sscanf(CS now,"%u",&inow); - sscanf(CS daystamp,"%u",&iexpire); + (void)sscanf(CS now,"%u",&inow); + (void)sscanf(CS daystamp,"%u",&iexpire); /* When "iexpire" is < 7, a "flip" has occured. Adjust "inow" accordingly. */ diff --git a/src/src/host.c b/src/src/host.c index c2a44a431..32e24e280 100644 --- a/src/src/host.c +++ b/src/src/host.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/host.c,v 1.9 2005/02/17 11:58:26 ph10 Exp $ */ +/* $Cambridge: exim/src/src/host.c,v 1.10 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -809,7 +809,7 @@ if (Ustrchr(address, ':') != NULL) /* Handle IPv4 address */ -sscanf(CS address, "%d.%d.%d.%d", x, x+1, x+2, x+3); +(void)sscanf(CS address, "%d.%d.%d.%d", x, x+1, x+2, x+3); bin[v4offset] = (x[0] << 24) + (x[1] << 16) + (x[2] << 8) + x[3]; return v4offset+1; } @@ -2969,12 +2969,12 @@ while (Ufgets(buffer, 256, stdin) != NULL) else if (Ustrcmp(buffer, "no_search_parents") == 0) search_parents = FALSE; else if (Ustrncmp(buffer, "retrans", 7) == 0) { - sscanf(CS(buffer+8), "%d", &dns_retrans); + (void)sscanf(CS(buffer+8), "%d", &dns_retrans); _res.retrans = dns_retrans; } else if (Ustrncmp(buffer, "retry", 5) == 0) { - sscanf(CS(buffer+6), "%d", &dns_retry); + (void)sscanf(CS(buffer+6), "%d", &dns_retry); _res.retry = dns_retry; } else if (alldigits(buffer)) diff --git a/src/src/log.c b/src/src/log.c index d2ef9e518..a39e2abfa 100644 --- a/src/src/log.c +++ b/src/src/log.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/log.c,v 1.3 2005/03/29 15:19:25 ph10 Exp $ */ +/* $Cambridge: exim/src/src/log.c,v 1.4 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -314,7 +314,7 @@ open, arrange for automatic closure on exec(), and then return. */ if (*fd >= 0) { - fcntl(*fd, F_SETFD, fcntl(*fd, F_GETFD) | FD_CLOEXEC); + (void)fcntl(*fd, F_SETFD, fcntl(*fd, F_GETFD) | FD_CLOEXEC); return; } @@ -367,7 +367,7 @@ else if (euid == root_uid) if (*fd >= 0) { - fcntl(*fd, F_SETFD, fcntl(*fd, F_GETFD) | FD_CLOEXEC); + (void)fcntl(*fd, F_SETFD, fcntl(*fd, F_GETFD) | FD_CLOEXEC); return; } diff --git a/src/src/receive.c b/src/src/receive.c index 1092d2b06..96ff902c6 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/receive.c,v 1.18 2005/05/23 15:28:38 fanf2 Exp $ */ +/* $Cambridge: exim/src/src/receive.c,v 1.19 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2602,8 +2602,8 @@ if (data_fd < 0) /* Make sure the file's group is the Exim gid, and double-check the mode because the group setting doesn't always get set automatically. */ -fchown(data_fd, exim_uid, exim_gid); -fchmod(data_fd, SPOOL_MODE); +(void)fchown(data_fd, exim_uid, exim_gid); +(void)fchmod(data_fd, SPOOL_MODE); /* We now have data file open. Build a stream for it and lock it. We lock only the first line of the file (containing the message ID) because otherwise there diff --git a/src/src/spam.c b/src/src/spam.c index 564145931..9544ff646 100644 --- a/src/src/spam.c +++ b/src/src/spam.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spam.c,v 1.7 2005/06/10 13:29:36 tom Exp $ */ +/* $Cambridge: exim/src/src/spam.c,v 1.8 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -221,7 +221,7 @@ int spam(uschar **listptr) { pollfd.fd = spamd_sock; pollfd.events = POLLOUT; #endif - fcntl(spamd_sock, F_SETFL, O_NONBLOCK); + (void)fcntl(spamd_sock, F_SETFL, O_NONBLOCK); do { read = fread(spamd_buffer,1,sizeof(spamd_buffer),mbox_file); if (read > 0) { diff --git a/src/src/spool_in.c b/src/src/spool_in.c index 8deb73eb6..e64ca9925 100644 --- a/src/src/spool_in.c +++ b/src/src/spool_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spool_in.c,v 1.10 2005/04/07 10:10:01 ph10 Exp $ */ +/* $Cambridge: exim/src/src/spool_in.c,v 1.11 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -76,7 +76,7 @@ an open file descriptor (at least, I think that's the Cygwin story). On real Unix systems it doesn't make any difference as long as Exim is consistent in what it locks. */ -fcntl(deliver_datafile, F_SETFD, fcntl(deliver_datafile, F_GETFD) | +(void)fcntl(deliver_datafile, F_SETFD, fcntl(deliver_datafile, F_GETFD) | FD_CLOEXEC); lock_data.l_type = F_WRLCK; @@ -581,7 +581,7 @@ for (recipients_count = 0; recipients_count < rcount; recipients_count++) if (*p == ' ') { *p++ = 0; - sscanf(CS p, "%d,%d", &dummy, &pno); + (void)sscanf(CS p, "%d,%d", &dummy, &pno); } } @@ -590,7 +590,7 @@ for (recipients_count = 0; recipients_count < rcount; recipients_count++) else if (*p == ' ') { *p++ = 0; - sscanf(CS p, "%d", &pno); + (void)sscanf(CS p, "%d", &pno); } /* Handle current format Exim 4 spool files */ @@ -598,13 +598,13 @@ for (recipients_count = 0; recipients_count < rcount; recipients_count++) else if (*p == '#') { int flags; - sscanf(CS p+1, "%d", &flags); + (void)sscanf(CS p+1, "%d", &flags); if ((flags & 0x01) != 0) /* one_time data exists */ { int len; while (isdigit(*(--p)) || *p == ',' || *p == '-'); - sscanf(CS p+1, "%d,%d", &len, &pno); + (void)sscanf(CS p+1, "%d,%d", &len, &pno); *p = 0; if (len > 0) { @@ -640,8 +640,8 @@ while ((n = fgetc(f)) != EOF) int i; if (!isdigit(n)) goto SPOOL_FORMAT_ERROR; - ungetc(n, f); - fscanf(f, "%d%c ", &n, flag); + (void)ungetc(n, f); + (void)fscanf(f, "%d%c ", &n, flag); if (flag[0] != '*') message_size += n; /* Omit non-transmitted headers */ if (read_headers) diff --git a/src/src/spool_out.c b/src/src/spool_out.c index 8feaf860f..a1a8dee3b 100644 --- a/src/src/spool_out.c +++ b/src/src/spool_out.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spool_out.c,v 1.6 2005/02/17 11:58:26 ph10 Exp $ */ +/* $Cambridge: exim/src/src/spool_out.c,v 1.7 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -96,8 +96,8 @@ automatically. */ if (fd >= 0) { - fchown(fd, exim_uid, exim_gid); - fchmod(fd, SPOOL_MODE); + (void)fchown(fd, exim_uid, exim_gid); + (void)fchmod(fd, SPOOL_MODE); } return fd; diff --git a/src/src/transport.c b/src/src/transport.c index 6630f36ee..e2ae60b3d 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/transport.c,v 1.10 2005/06/20 11:20:41 ph10 Exp $ */ +/* $Cambridge: exim/src/src/transport.c,v 1.11 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1164,10 +1164,10 @@ save_errno = 0; yield = FALSE; write_pid = (pid_t)(-1); -fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); +(void)fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); filter_pid = child_open(transport_filter_argv, NULL, 077, &fd_write, &fd_read, FALSE); -fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) & ~FD_CLOEXEC); +(void)fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) & ~FD_CLOEXEC); if (filter_pid < 0) goto TIDY_UP; /* errno set */ DEBUG(D_transport) diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c index b17eb3b39..a2b7cfcb6 100644 --- a/src/src/transports/appendfile.c +++ b/src/src/transports/appendfile.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.8 2005/06/16 14:10:14 ph10 Exp $ */ +/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.9 2005/06/22 15:44:38 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1734,8 +1734,8 @@ if (!isdirectory) /* We have successfully created and opened the file. Ensure that the group and the mode are correct. */ - Uchown(filename, uid, gid); - Uchmod(filename, mode); + (void)Uchown(filename, uid, gid); + (void)Uchmod(filename, mode); } @@ -2002,7 +2002,7 @@ if (!isdirectory) goto RETURN; } - Uchmod(mbx_lockname, 0600); + (void)Uchmod(mbx_lockname, 0600); if (apply_lock(mbx_lockfd, F_WRLCK, ob->use_fcntl, ob->lock_fcntl_timeout, ob->use_flock, ob->lock_flock_timeout) >= 0) @@ -2415,8 +2415,8 @@ else /* Why are these here? Put in because they are present in the non-maildir directory case above. */ - Uchown(filename, uid, gid); - Uchmod(filename, mode); + (void)Uchown(filename, uid, gid); + (void)Uchmod(filename, mode); } #endif /* SUPPORT_MAILDIR */ @@ -2457,8 +2457,8 @@ else /* Why are these here? Put in because they are present in the non-maildir directory case above. */ - Uchown(filename, uid, gid); - Uchmod(filename, mode); + (void)Uchown(filename, uid, gid); + (void)Uchmod(filename, mode); /* Built a C stream from the open file descriptor. */ @@ -2549,8 +2549,8 @@ else Uunlink(filename); return FALSE; } - Uchown(dataname, uid, gid); - Uchmod(dataname, mode); + (void)Uchown(dataname, uid, gid); + (void)Uchmod(dataname, mode); } #endif /* SUPPORT_MAILSTORE */ @@ -2559,8 +2559,8 @@ else /* In all cases of writing to a new file, ensure that the file which is going to be renamed has the correct ownership and mode. */ - Uchown(filename, uid, gid); - Uchmod(filename, mode); + (void)Uchown(filename, uid, gid); + (void)Uchmod(filename, mode); } @@ -2919,7 +2919,7 @@ if (yield != OK) investigated so far have ftruncate(), whereas not all have the F_FREESP fcntl() call (BSDI & FreeBSD do not). */ - if (!isdirectory) ftruncate(fd, saved_size); + if (!isdirectory) (void)ftruncate(fd, saved_size); } /* Handle successful writing - we want the modification time to be now for -- 2.25.1