From: Lubomir Rintel Subject: [PATCH] Fix useless warnings using most locales This actually addresses two issues: Consider blank lines to be comments, skip over them rather than attempting to read keywords there. Empty a token when the comment is enountered -- the comment is not necessarily followed by a keyword, but it can be an EOF. diff -up supertux-0.3.1/src/tinygettext/tinygettext.cpp.comments supertux-0.3.1/src/tinygettext/tinygettext.cpp --- supertux-0.3.1/src/tinygettext/tinygettext.cpp.comments 2008-12-20 22:37:54.000000000 +0100 +++ supertux-0.3.1/src/tinygettext/tinygettext.cpp 2008-12-20 22:38:17.000000000 +0100 @@ -705,15 +705,16 @@ public: switch(state) { case READ_KEYWORD: - if (c == '#') + // Read a new token + token = Token(); + + if (c == '#' || c == '\n' || c == '\r') { state = SKIP_COMMENT; + in.unget(); } else { - // Read a new token - token = Token(); - do { // Read keyword token.keyword += c; } while((c = getchar(in)) != EOF && !isspace(c)); .