mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Fix a few warnings on OpenBSD
- redeclaration of dst_size - arpa/inet.h requires netinet/in.h first - don't use a local with the same name as a global - it isn't needed so remove it
This commit is contained in:
parent
e934096490
commit
8ee9f9c1cf
@ -158,7 +158,7 @@ be_pair_transfer(struct bufferevent *src, struct bufferevent *dst,
|
|||||||
evbuffer_unfreeze(dst->input, 0);
|
evbuffer_unfreeze(dst->input, 0);
|
||||||
|
|
||||||
if (dst->wm_read.high) {
|
if (dst->wm_read.high) {
|
||||||
size_t dst_size = evbuffer_get_length(dst->input);
|
dst_size = evbuffer_get_length(dst->input);
|
||||||
if (dst_size < dst->wm_read.high) {
|
if (dst_size < dst->wm_read.high) {
|
||||||
n = dst->wm_read.high - dst_size;
|
n = dst->wm_read.high - dst_size;
|
||||||
evbuffer_remove_buffer(src->output, dst->input, n);
|
evbuffer_remove_buffer(src->output, dst->input, n);
|
||||||
|
6
evutil.c
6
evutil.c
@ -55,15 +55,15 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef _EVENT_HAVE_ARPA_INET_H
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#endif
|
|
||||||
#ifdef _EVENT_HAVE_NETINET_IN_H
|
#ifdef _EVENT_HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef _EVENT_HAVE_NETINET_IN6_H
|
#ifdef _EVENT_HAVE_NETINET_IN6_H
|
||||||
#include <netinet/in6.h>
|
#include <netinet/in6.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _EVENT_HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _EVENT_HAVE_GETTIMEOFDAY
|
#ifndef _EVENT_HAVE_GETTIMEOFDAY
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
|
@ -223,7 +223,6 @@ ht_string_hash(const char *s)
|
|||||||
void *data) \
|
void *data) \
|
||||||
{ \
|
{ \
|
||||||
unsigned idx; \
|
unsigned idx; \
|
||||||
int remove; \
|
|
||||||
struct type **p, **nextp, *next; \
|
struct type **p, **nextp, *next; \
|
||||||
if (!head->hth_table) \
|
if (!head->hth_table) \
|
||||||
return; \
|
return; \
|
||||||
@ -232,8 +231,7 @@ ht_string_hash(const char *s)
|
|||||||
while (*p) { \
|
while (*p) { \
|
||||||
nextp = &(*p)->field.hte_next; \
|
nextp = &(*p)->field.hte_next; \
|
||||||
next = *nextp; \
|
next = *nextp; \
|
||||||
remove = fn(*p, data); \
|
if (fn(*p, data)) { \
|
||||||
if (remove) { \
|
|
||||||
--head->hth_n_entries; \
|
--head->hth_n_entries; \
|
||||||
*p = next; \
|
*p = next; \
|
||||||
} else { \
|
} else { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user