Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuiba authored and beef9999 committed Mar 3, 2024
1 parent bf58428 commit 37f7b66
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_BUILD_PARALLEL_LEVEL ${NumCPU})

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-packed-bitfield-compat")
endif()

if (${ARCH} STREQUAL x86_64)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
elseif (${ARCH} STREQUAL aarch64)
Expand Down
1 change: 0 additions & 1 deletion examples/perf/net-perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ DEFINE_uint64(port, 9527, "port");
DEFINE_uint64(buf_size, 512, "buffer size");
DEFINE_uint64(vcpu_num, 1, "server vcpu num. Increase this value to enable multi-vcpu scheduling");

static int event_engine = 0;
static bool stop_test = false;
static uint64_t qps = 0;
static uint64_t time_cost = 0;
Expand Down
4 changes: 3 additions & 1 deletion net/http/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ class ClientImpl : public Client {
CommonHeaders<> m_common_headers;
ICookieJar *m_cookie_jar;
ClientImpl(ICookieJar *cookie_jar, TLSContext *tls_ctx) :
m_dialer(tls_ctx), m_cookie_jar(cookie_jar) { }
m_dialer(tls_ctx),
m_cookie_jar(cookie_jar) {
}

using SocketStream_ptr = std::unique_ptr<ISocketStream>;
int redirect(Operation* op) {
Expand Down
3 changes: 3 additions & 0 deletions net/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ void base64_translate_3to4(const char *in, char *out) {
static const unsigned char tbl[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
auto v = htonl(*(uint32_t *)in);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
auto x = (xlator*) &v;
#pragma GCC diagnostic pop
*(uint32_t *)out = ((tbl[x->a] << 24) + (tbl[x->b] << 16) +
(tbl[x->c] << 8) + (tbl[x->d] << 0));
}
Expand Down

0 comments on commit 37f7b66

Please sign in to comment.