odyssey: fix warnings

This commit is contained in:
Dmitry Simonenko 2019-02-10 14:27:28 +03:00
parent f0374cb4f4
commit 73f4f9e8ca
3 changed files with 7 additions and 4 deletions

View File

@ -379,13 +379,15 @@ od_logger_write(od_logger_t *logger, od_logger_level_t level,
int len;
len = od_logger_format(logger, level, context, client, server,
fmt, args, output, sizeof(output));
int rc;
if (logger->fd != -1) {
(void)write(logger->fd, output, len);
rc = write(logger->fd, output, len);
}
if (logger->log_stdout) {
(void)write(STDOUT_FILENO, output, len);
rc = write(STDOUT_FILENO, output, len);
}
if (logger->log_syslog) {
syslog(od_log_syslog_level[level], "%.*s", len, output);
}
(void)rc;
}

View File

@ -83,8 +83,8 @@ od_readahead_pos_read_advance(od_readahead_t *readahead, int value)
static inline void
od_readahead_reuse(od_readahead_t *readahead)
{
int unread = od_readahead_unread(readahead);
if (unread > (int)sizeof(sizeof(kiwi_header_t)))
size_t unread = od_readahead_unread(readahead);
if (unread > sizeof(sizeof(kiwi_header_t)))
return;
if (unread == 0) {
readahead->pos = 0;

View File

@ -28,6 +28,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/uio.h>
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/signalfd.h>