Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ AC_ARG_ENABLE([compile-warnings],
;;
maximum)
WARNING_CXXFLAGS="-Wall"
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++ -Wmissing-declarations"
PICKY_CXXFLAGS="-Wextra -Wno-long-long -Weffc++ -Wmissing-declarations"
;;
error)
# remove -Wno-c++17-extensions once protocolbuffers/protobuf#9181 is
# resolved
# remove -Wno-unused-parameter once
# protocolbuffers/protobuf#10357 is resolved
WARNING_CXXFLAGS="-Wall -Werror -Wno-c++17-extensions"
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++ -Wmissing-declarations -Wno-unused-parameter"
PICKY_CXXFLAGS="-Wextra -Wno-long-long -Weffc++ -Wmissing-declarations -Wno-unused-parameter"
;;
distcheck)
WARNING_CXXFLAGS="-Wall -Werror"
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++ -Wmissing-declarations"
PICKY_CXXFLAGS="-Wextra -Wno-long-long -Weffc++ -Wmissing-declarations"
AX_CHECK_COMPILE_FLAG([-Wno-error=unused-parameter],
[PICKY_CXXFLAGS="$PICKY_CXXFLAGS -Wno-error=unused-parameter"], [], [-Werror])
AX_CHECK_COMPILE_FLAG([-Wno-error=c++11-extensions],
Expand Down
5 changes: 3 additions & 2 deletions src/terminal/terminalframebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,9 @@ class Framebuffer
if ( row == -1 )
row = ds.get_cursor_row();
row_pointer& mutable_row = rows.at( row );
// If the row is shared, copy it.
if ( !mutable_row.unique() ) {
// If the row is shared, copy it. This is only safe because mosh isn't
// multi-threaded.
if ( mutable_row.use_count() > 1 ) {
mutable_row = std::make_shared<Row>( *mutable_row );
}
return mutable_row.get();
Expand Down