mirror of https://github.com/yandex/odyssey.git
odyssey: fix warnings
This commit is contained in:
parent
f0374cb4f4
commit
73f4f9e8ca
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue