[valadoc] libvaladoc: Fix new warnings
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] libvaladoc: Fix new warnings
- Date: Fri, 29 Jul 2011 01:00:08 +0000 (UTC)
commit 60399c3f6aef98a54f5b178a6869476c63a54d89
Author: Florian Brosch <flo brosch gmail com>
Date: Mon Jul 25 11:43:33 2011 +0200
libvaladoc: Fix new warnings
src/libvaladoc/markupreader.vala | 10 ++++------
src/libvaladoc/parser/rule.vala | 2 ++
src/libvaladoc/parser/token.vala | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/libvaladoc/markupreader.vala b/src/libvaladoc/markupreader.vala
index d6ea9d9..b4bf82f 100644
--- a/src/libvaladoc/markupreader.vala
+++ b/src/libvaladoc/markupreader.vala
@@ -118,6 +118,8 @@ public class Valadoc.MarkupReader : Object {
if (empty_element) {
empty_element = false;
+ token_begin = MarkupSourceLocation (begin, line, column);
+ token_end = MarkupSourceLocation (begin, line, column);
return MarkupTokenType.END_ELEMENT;
}
@@ -125,9 +127,7 @@ public class Valadoc.MarkupReader : Object {
MarkupTokenType type = MarkupTokenType.NONE;
char* begin = current;
- token_begin.pos = begin;
- token_begin.line = line;
- token_begin.column = column;
+ token_begin = MarkupSourceLocation (begin, line, column);
if (current >= end) {
type = MarkupTokenType.EOF;
@@ -217,9 +217,7 @@ public class Valadoc.MarkupReader : Object {
type = MarkupTokenType.TEXT;
}
- token_end.pos = current;
- token_end.line = line;
- token_end.column = column - 1;
+ token_end = MarkupSourceLocation (current, line, column - 1);
return type;
}
diff --git a/src/libvaladoc/parser/rule.vala b/src/libvaladoc/parser/rule.vala
index b75e39a..192cfa5 100755
--- a/src/libvaladoc/parser/rule.vala
+++ b/src/libvaladoc/parser/rule.vala
@@ -143,6 +143,8 @@ public abstract class Valadoc.Rule : Object {
handled = false;
return true;
}
+
+ handled = false;
return false;
}
diff --git a/src/libvaladoc/parser/token.vala b/src/libvaladoc/parser/token.vala
index d6917df..ced9ab3 100755
--- a/src/libvaladoc/parser/token.vala
+++ b/src/libvaladoc/parser/token.vala
@@ -97,6 +97,6 @@ public class Valadoc.Token : Object {
public int to_int () {
assert (is_number);
- return _word.to_int ();
+ return int.parse (_word);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]