compiler warning:
test/regress_http.c:968:38: warning: result of comparison of constant 65536 with expression of type 'enum evhttp_cmd_type' is always true [-Wtautological-constant-out-of-range-compare]
if (evhttp_request_get_command(req) != EVHTTP_REQ_CUSTOM) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
For the CMake release build with -DEVENT__ENABLE_GCC_WARNINGS=ON
and -DEVENT__DISABLE_MM_REPLACEMENT=ON, GCC version 11 and 12 may
complain about possibly uninitialized variable:
In function ‘event_debug_assert_not_added_’,
inlined from ‘event_assign’ at event.c:2184:2,
inlined from ‘event_new’ at event.c:2276:6:
cc1: error: ‘ev’ may be used uninitialized [-Werror=maybe-uninitialized]
event.c: In function ‘event_new’:
event.c:361:13: note: by argument 1 of type ‘const struct event *’ to event_debug_assert_not_added_.part.0’ declared here
361 | static void event_debug_assert_not_added_(const struct event *ev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This warning is most likely a false positive and can be silenced
by explicitly disabling inlining for 'event_assign()'.
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Previously in case when evbuffer_reserve_space() returns > 1, but
it was able to read only 1 IO vector, it will try to read the next one,
got 0 (EOF for mbedTLS or SSL_ERROR_ZERO_RETURN for OpenSSL) and will
trigger EOF, while instead, it should trigger EV_READ w/o EOF and only
after EOF.
Now that the jobs are running again, a number of deprecation warnings
have surfaced
https://github.com/libevent/libevent/actions/runs/4876367881:
```bash
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2.0.0.
```
Looks like the most straightforward thing todo here is just use the
newer version of the checkout action.
Also move to the v1 tag for the coveralls job, rather than a pinned,
much older version (the latest release is 1.2.5, https://github.com/coverallsapp/github-action/releases).
Same again for actions/cache.
It is not a thankless task to fix such issues on and on, let's just
prohibit this cases, and our build with -Werror on CI will show new
issues from now on.
Fixes: #1434
This is output when compiling (natively) on macOS systems, which is
confusing, because no cross-compilation is involved.
Split the message into separate cases.
SSL write may do partial writes in some cases. For example, document
of mbedtls_ssl_write says:
If the return value is non-negative but less than length, the function
must be called again with updated arguments: buf + ret, len - ret
(if ret is the return value) until it returns a value equal to the
last 'len' argument.
In case of partial writes, we should continue writing the same chain of
buffer, not the next chain.
github action reports "internal error" for builds on ubuntu 18.04:
linux-cmake-job (ubuntu-18.04, COMPILER_CLANG)
This is a scheduled Ubuntu-18.04 brownout. The Ubuntu-18.04 environment is deprecated and will be removed on April 1st, 2023. For more details, see https://github.com/actions/runner-images/issues/6002
linux-cmake-job (ubuntu-18.04, COMPILER_CLANG)
GitHub Actions has encountered an internal error when running your job.
Change made by setting top-level read-only permisisons, and any
other necessary permissions set as job-level.
Closes#1421
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
This just copies the same logic used to find OpenSSL on macOS using homebrew, for finding mbedtls via brew. Without it, the build will fail out the box with a brew installed mbedtls.
When libevent doesn't provide random the arc4 function, but they come from libc, there is no need to call this function, so make it do nothing.
Fixes: #1393
1. In d4de062, in Feb 2010, libevent adopted OpenBSD implementation of
arc4random_uniform.
2. In
728918cba9,
in Jun 2012, OpenBSD improved their implementation to be faster, by
changing arc4random_uniform() to calculate ``2**32 % upper_bound'' as
``-upper_bound % upper_bound''.
Alternatively we can simply remove arc4random_uniform() since it is not
used by libevent anyway, but let's just sync the header for now.
We have almost the same matrix for cmake and autotools, but autotools is
considered to be deprecated from now on, plus our CI takes too much
time, especially non-linux, since we are using public infrastucture.
So let's remove extra builds.
In commit f8bb9d8 the header stringapiset.h was included, very likely because the user who made the change saw that the funciton WideCharToMultiByte is "declared" in there.
That header tho is a recent addition to the windows headers added in the last years in an attempt from microsoft to split the windows.h header in multiple files, so the inclusion fails when the library is not built with the latest visual studio using the latest windows 10 sdk.
That inclusion can be safely removed as in any case the function WideCharToMultiByte was already included by the windows.h header that is included few lines below.