mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -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);
|
||||
|
||||
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) {
|
||||
n = dst->wm_read.high - dst_size;
|
||||
evbuffer_remove_buffer(src->output, dst->input, n);
|
||||
|
6
evutil.c
6
evutil.c
@ -55,15 +55,15 @@
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef _EVENT_HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef _EVENT_HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef _EVENT_HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#endif
|
||||
#ifdef _EVENT_HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifndef _EVENT_HAVE_GETTIMEOFDAY
|
||||
#include <sys/timeb.h>
|
||||
|
@ -223,7 +223,6 @@ ht_string_hash(const char *s)
|
||||
void *data) \
|
||||
{ \
|
||||
unsigned idx; \
|
||||
int remove; \
|
||||
struct type **p, **nextp, *next; \
|
||||
if (!head->hth_table) \
|
||||
return; \
|
||||
@ -232,8 +231,7 @@ ht_string_hash(const char *s)
|
||||
while (*p) { \
|
||||
nextp = &(*p)->field.hte_next; \
|
||||
next = *nextp; \
|
||||
remove = fn(*p, data); \
|
||||
if (remove) { \
|
||||
if (fn(*p, data)) { \
|
||||
--head->hth_n_entries; \
|
||||
*p = next; \
|
||||
} else { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user