summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Reh <sefi@s-e-f-i.de>2009-02-20 18:55:15 +0100
committerPhilipp Reh <sefi@s-e-f-i.de>2009-02-20 18:55:15 +0100
commit0ecb0f815acfcf5849d5333c6e585584e93649f7 (patch)
treee3beccd331c31cf00749926f73ff133fbade34c9
parentbcd2d0a55d0f4af08360a650f2f2963543465987 (diff)
Added -Wconverison and fixed the warnings.
-rw-r--r--Makefile2
-rw-r--r--kana2romaji.cpp2
-rw-r--r--xmlparser.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c810ef6..af89248 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
PREFIX ?= /usr
-OPTS=-Wall -Wextra -ansi -pedantic-errors $(CXXFLAGS)
+OPTS=-Wall -Wextra -ansi -pedantic-errors -Wconversion $(CXXFLAGS)
DICTIONARY_PATH=$(PREFIX)/share/jmdict
DICTIONARY_NAME="\"$(DICTIONARY_PATH)/database\""
BINDIR=${DESTDIR}${PREFIX}/bin
diff --git a/kana2romaji.cpp b/kana2romaji.cpp
index 43a2d40..99591eb 100644
--- a/kana2romaji.cpp
+++ b/kana2romaji.cpp
@@ -27,7 +27,7 @@ using namespace std;
namespace {
void utfchar(const string& from, string::size_type pos, string& to) {
- string::value_type first = from[pos];
+ unsigned first = from[pos];
if ((first & 0x80) == 0)
to = from[pos];
else {
diff --git a/xmlparser.h b/xmlparser.h
index 29745eb..08b3c38 100644
--- a/xmlparser.h
+++ b/xmlparser.h
@@ -80,7 +80,7 @@ public:
while (in) {
char* buffer = static_cast<char*>(XML_GetBuffer(m_parser, BLOCK_SIZE));
in.read(buffer, BLOCK_SIZE);
- XML_ParseBuffer(m_parser, in.gcount(), in.eof());
+ XML_ParseBuffer(m_parser, static_cast<int>(in.gcount()), in.eof());
}
}