Makefile: add -Wall to CXXFLAGS
This commit is contained in:
parent
0ce6bd9bf5
commit
c92077762c
|
@ -2,7 +2,7 @@ sources := $(wildcard *.cc)
|
|||
objects := $(sources:.cc=.o)
|
||||
deps := $(addprefix ., $(sources:.cc=.d))
|
||||
|
||||
CXXFLAGS += -std=c++0x -g
|
||||
CXXFLAGS += -std=c++0x -g -Wall -Wno-reorder -Wno-sign-compare
|
||||
LDFLAGS += -lmenu -lncurses -lboost_regex
|
||||
|
||||
kak : $(objects)
|
||||
|
|
|
@ -344,17 +344,15 @@ void Buffer::apply_modification(const Modification& modification)
|
|||
{
|
||||
case Modification::Insert:
|
||||
{
|
||||
BufferIterator pos = modification.position < end() ?
|
||||
modification.position : end();
|
||||
do_insert(pos, modification.content);
|
||||
do_insert(pos < end() ? pos : end(), content);
|
||||
break;
|
||||
}
|
||||
case Modification::Erase:
|
||||
{
|
||||
ByteCount count = modification.content.length();
|
||||
BufferIterator end = modification.position + count;
|
||||
assert(string(modification.position, end) == modification.content);
|
||||
do_erase(modification.position, end);
|
||||
ByteCount count = content.length();
|
||||
BufferIterator end = pos + count;
|
||||
assert(string(pos, end) == content);
|
||||
do_erase(pos, end);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -486,6 +486,8 @@ public:
|
|||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (reset_completer)
|
||||
m_completer.reset(context);
|
||||
|
|
|
@ -32,7 +32,7 @@ const ColorPair& ColorRegistry::operator[](const String& colordesc)
|
|||
parse_color(String(it+1, colordesc.end()))
|
||||
: Color::Default };
|
||||
|
||||
m_aliases[colordesc] = colpair;
|
||||
return (m_aliases[colordesc] = colpair);
|
||||
}
|
||||
|
||||
void ColorRegistry::register_alias(const String& name, const String& colordesc,
|
||||
|
|
|
@ -54,6 +54,8 @@ public:
|
|||
case ReplacedBufferRange:
|
||||
return m_text;
|
||||
}
|
||||
assert(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CharCount length() const
|
||||
|
@ -66,6 +68,8 @@ public:
|
|||
case ReplacedBufferRange:
|
||||
return m_text.char_length();
|
||||
}
|
||||
assert(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const BufferIterator& begin() const
|
||||
|
|
|
@ -170,9 +170,9 @@ SelectionAndCaptures select_line(const Selection& selection)
|
|||
|
||||
SelectionAndCaptures select_matching(const Selection& selection)
|
||||
{
|
||||
std::vector<char> matching_pairs = { '(', ')', '{', '}', '[', ']', '<', '>' };
|
||||
std::vector<Codepoint> matching_pairs = { '(', ')', '{', '}', '[', ']', '<', '>' };
|
||||
Utf8Iterator it = selection.last();
|
||||
std::vector<char>::iterator match = matching_pairs.end();
|
||||
std::vector<Codepoint>::iterator match = matching_pairs.end();
|
||||
while (not is_eol(*it))
|
||||
{
|
||||
match = std::find(matching_pairs.begin(), matching_pairs.end(), *it);
|
||||
|
@ -188,8 +188,8 @@ SelectionAndCaptures select_matching(const Selection& selection)
|
|||
if (((match - matching_pairs.begin()) % 2) == 0)
|
||||
{
|
||||
int level = 0;
|
||||
const char opening = *match;
|
||||
const char closing = *(match+1);
|
||||
const Codepoint opening = *match;
|
||||
const Codepoint closing = *(match+1);
|
||||
while (not is_end(it))
|
||||
{
|
||||
if (*it == opening)
|
||||
|
@ -203,8 +203,8 @@ SelectionAndCaptures select_matching(const Selection& selection)
|
|||
else
|
||||
{
|
||||
int level = 0;
|
||||
const char opening = *(match-1);
|
||||
const char closing = *match;
|
||||
const Codepoint opening = *(match-1);
|
||||
const Codepoint closing = *match;
|
||||
while (not is_begin(it))
|
||||
{
|
||||
if (*it == closing)
|
||||
|
|
Loading…
Reference in New Issue
Block a user