mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
os: log: suppress warnings on ignore retval of write()
These callers really don't wanna care about the return values, so we can safely suppress the warnings. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
4
os/log.c
4
os/log.c
@@ -268,7 +268,7 @@ LogInit(const char *fname, const char *backup)
|
||||
|
||||
/* Flush saved log information. */
|
||||
if (saveBuffer && bufferSize > 0) {
|
||||
write(logFileFd, saveBuffer, bufferPos);
|
||||
(void)write(logFileFd, saveBuffer, bufferPos);
|
||||
doLogSync();
|
||||
}
|
||||
}
|
||||
@@ -602,7 +602,7 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line)
|
||||
|
||||
localtime_r(&t, &tm);
|
||||
strftime(fmt_tm, sizeof(fmt_tm) - 1, "[%Y-%m-%d %H:%M:%S] ", &tm);
|
||||
write(logFileFd, fmt_tm, strlen(fmt_tm));
|
||||
(void)write(logFileFd, fmt_tm, strlen(fmt_tm));
|
||||
}
|
||||
newline = end_line;
|
||||
write(logFileFd, buf, len);
|
||||
|
||||
Reference in New Issue
Block a user