summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-06-05 13:33:02 +0000
committerMaxime Coste <frrrwww@gmail.com>2012-06-05 13:33:02 +0000
commitfd8517f91e9d7deacf5be1471e93571a69cea561 (patch)
tree5a1fe78964a971a3dce7163bc79717dfad950a33 /src
parent5936aa6710b274675fba5d621776c32c39e9eace (diff)
fix some warnings detected with clang
Diffstat (limited to 'src')
-rw-r--r--src/buffer.cc2
-rw-r--r--src/commands.cc4
-rw-r--r--src/filters.cc2
-rw-r--r--src/main.cc2
4 files changed, 7 insertions, 3 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index 59ece2ae..c111a3b3 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -177,6 +177,7 @@ bool Buffer::undo()
for (const Modification& modification : reversed(*m_history_cursor))
apply_modification(modification.inverse());
+ return true;
}
bool Buffer::redo()
@@ -188,6 +189,7 @@ bool Buffer::redo()
apply_modification(modification);
++m_history_cursor;
+ return true;
}
void Buffer::check_invariant() const
diff --git a/src/commands.cc b/src/commands.cc
index 71043d28..347fa539 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -855,7 +855,7 @@ void register_commands()
params[token_to_complete] : String();
if (token_to_complete == 1 and params[0] == "-group")
return w.highlighters().complete_group_id(arg, pos_in_token);
- else if (token_to_complete == 0 or token_to_complete == 2 and params[0] == "-group")
+ else if (token_to_complete == 0 or (token_to_complete == 2 and params[0] == "-group"))
return HighlighterRegistry::instance().complete_highlighter(arg, pos_in_token);
else
return CandidateList();
@@ -883,7 +883,7 @@ void register_commands()
params[token_to_complete] : String();
if (token_to_complete == 1 and params[0] == "-group")
return w.filters().complete_group_id(arg, pos_in_token);
- else if (token_to_complete == 0 or token_to_complete == 2 and params[0] == "-group")
+ else if (token_to_complete == 0 or (token_to_complete == 2 and params[0] == "-group"))
return FilterRegistry::instance().complete_filter(arg, pos_in_token);
else
return CandidateList();
diff --git a/src/filters.cc b/src/filters.cc
index 453f95e3..185dd1bf 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -27,7 +27,7 @@ void cleanup_whitespaces(Buffer& buffer, Modification& modification)
modification.content[0] == '\n' and not modification.position.is_begin())
{
BufferIterator position = modification.position-1;
- while (*position == ' ' or *position == '\t' and not position.is_begin())
+ while ((*position == ' ' or *position == '\t') and not position.is_begin())
--position;
++position;
if (position != modification.position)
diff --git a/src/main.cc b/src/main.cc
index 36d45699..d068bf27 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -92,6 +92,8 @@ bool insert_char(IncrementalInserter& inserter, const Key& key)
break;
}
break;
+ default:
+ break;
}
return true;
}