compile with -pedantic option and fix warnings
This commit is contained in:
parent
4aa5a9a3f6
commit
4fbe2dc6bc
|
@ -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
|
||||
|
|
|
@ -25,7 +25,7 @@ private:
|
|||
const BufferIterator& end) override;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif // dynamic_selection_list_hh_INCLUDED
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user