Skip to content

Commit 9c8ad8e

Browse files
committed
Remove g++ warning and fix HTTP header value
1 parent a9250e7 commit 9c8ad8e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ endif(silent)
8282
set(CAPABS "${CAPABS} ${OPTIMIZE}")
8383

8484
if (CMAKE_COMPILER_IS_GNUCC)
85-
set(CMAKE_CXX_FLAGS "-m32 -MMD ${CAPABS} ${WARNS} -nostdlib -c -std=c++14 -D_LIBCPP_HAS_NO_THREADS=1 -DOS_VERSION=\\\"${OS_VERSION}\\\"")
85+
# gcc/g++ settings
86+
set(CMAKE_CXX_FLAGS "-m32 -MMD ${CAPABS} ${WARNS} -Wno-frame-address -nostdlib -c -std=c++14 -D_LIBCPP_HAS_NO_THREADS=1 -DOS_VERSION=\\\"${OS_VERSION}\\\"")
8687
set(CMAKE_C_FLAGS "-m32 -MMD ${CAPABS} ${WARNS} -nostdlib -c -DOS_VERSION=\"\"${OS_VERSION}\"\"")
8788
else()
8889
# these kinda work with llvm

src/net/http/header.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bool Header::has_field(util::csview field) const noexcept {
6464
util::sview Header::value(util::csview field) const noexcept {
6565
if (field.empty()) return field;
6666
const auto it = find(field);
67-
return (it not_eq fields_.cend()) ? it->second : util::sview().to_string();
67+
return (it not_eq fields_.cend()) ? util::csview{it->second} : util::sview();
6868
}
6969

7070
///////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)