summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-04-03 19:20:38 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-04-04 14:04:37 +0200
commit4fbe2dc6bc2522e79558fcb1af19d0cad947ea83 (patch)
tree1b2c0cff7d058b9da2f4c1a40f8f098163d226f9 /src
parent4aa5a9a3f617b5a9d596c8c6e02d385e3d2bcfed (diff)
compile with -pedantic option and fix warnings
Diffstat (limited to 'src')
-rw-r--r--src/Makefile2
-rw-r--r--src/dynamic_selection_list.hh2
-rw-r--r--src/highlighters.cc4
-rw-r--r--src/remote.cc10
4 files changed, 9 insertions, 9 deletions
diff --git a/src/Makefile b/src/Makefile
index 96794daa..d252715e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,7 @@ sources := $(wildcard *.cc)
objects := $(addprefix ., $(sources:.cc=.o))
deps := $(addprefix ., $(sources:.cc=.d))
-CXXFLAGS += -std=c++11 -g -Wall -Wno-reorder -Wno-sign-compare
+CXXFLAGS += -std=c++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic
LIBS += -lmenu -lncursesw -lboost_regex
debug ?= yes
diff --git a/src/dynamic_selection_list.hh b/src/dynamic_selection_list.hh
index 34f4c05c..1d976992 100644
--- a/src/dynamic_selection_list.hh
+++ b/src/dynamic_selection_list.hh
@@ -25,7 +25,7 @@ private:
const BufferIterator& end) override;
};
-};
+}
#endif // dynamic_selection_list_hh_INCLUDED
diff --git a/src/highlighters.cc b/src/highlighters.cc
index dd3becf8..b8d1c348 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -196,7 +196,7 @@ HighlighterAndId highlight_search_factory(const HighlighterParameters params, co
{
throw runtime_error(String("regex error: ") + err.what());
}
-};
+}
HighlighterAndId highlight_regex_option_factory(const HighlighterParameters params, const Window& window)
{
@@ -211,7 +211,7 @@ HighlighterAndId highlight_regex_option_factory(const HighlighterParameters para
auto get_regex = [option_name, &options]{ return options[option_name].get<Regex>(); };
return {"hloption_" + option_name, DynamicRegexHighlighter<decltype(get_regex)>{colors, get_regex}};
-};
+}
void expand_tabulations(const OptionManager& options, DisplayBuffer& display_buffer)
{
diff --git a/src/remote.cc b/src/remote.cc
index f3d5db01..2e19cc45 100644
--- a/src/remote.cc
+++ b/src/remote.cc
@@ -53,7 +53,7 @@ public:
void write(const T& val)
{
write((const char*)&val, sizeof(val));
- };
+ }
void write(const String& str)
{
@@ -67,7 +67,7 @@ public:
write<uint32_t>(view.size());
for (auto& val : view)
write(val);
- };
+ }
template<typename T>
void write(const std::vector<T>& vec)
@@ -119,7 +119,7 @@ T read(int socket)
char value[sizeof(T)];
read(socket, value, sizeof(T));
return *(T*)(value);
-};
+}
template<>
String read<String>(int socket)
@@ -131,7 +131,7 @@ String read<String>(int socket)
assert(length < 2048);
read(socket, buffer, (int)length);
return String(buffer, buffer+(int)length);
-};
+}
template<typename T>
std::vector<T> read_vector(int socket)
@@ -142,7 +142,7 @@ std::vector<T> read_vector(int socket)
while (size--)
res.push_back(read<T>(socket));
return res;
-};
+}
template<>
DisplayAtom read<DisplayAtom>(int socket)