Commit 8a5b4892 authored by Jürg Billeter's avatar Jürg Billeter Committed by Martyn Russell

Fix Vala warnings

parent 32d8f75c
......@@ -51,9 +51,7 @@ internal class Tracker.Bus.ArrayCursor : Tracker.Sparql.Cursor {
str = results[current_row, column];
if (&length != null) {
length = str.length;
}
length = str.length;
return str;
}
......
......@@ -838,6 +838,8 @@ class Tracker.Sparql.Expression : Object {
}
internal string parse_string_literal (out PropertyType type = null) throws Sparql.Error {
type = PropertyType.STRING;
next ();
switch (last ()) {
case SparqlTokenType.STRING_LITERAL1:
......@@ -889,12 +891,7 @@ class Tracker.Sparql.Expression : Object {
if (accept (SparqlTokenType.DOUBLE_CIRCUMFLEX)) {
// typed literal
var parsed_type = parse_type_uri ();
if (&type == null) {
// caller not interested in type
} else {
type = parsed_type;
}
type = parse_type_uri ();
}
return sb.str;
......@@ -904,12 +901,7 @@ class Tracker.Sparql.Expression : Object {
if (accept (SparqlTokenType.DOUBLE_CIRCUMFLEX)) {
// typed literal
var parsed_type = parse_type_uri ();
if (&type == null) {
// caller not interested in type
} else {
type = parsed_type;
}
type = parse_type_uri ();
}
return result;
......
......@@ -468,9 +468,7 @@ public class Tracker.SparqlScanner : Object {
SparqlTokenType type;
char* begin = current;
token_begin.pos = begin;
token_begin.line = line;
token_begin.column = column;
token_begin = SourceLocation (begin, line, column);
int token_length_in_chars = -1;
......@@ -792,9 +790,7 @@ public class Tracker.SparqlScanner : Object {
column += token_length_in_chars;
}
token_end.pos = current;
token_end.line = line;
token_end.column = column - 1;
token_end = SourceLocation (current, line, column - 1);
return type;
}
......@@ -850,6 +846,12 @@ public struct Tracker.SourceLocation {
public char* pos;
public int line;
public int column;
public SourceLocation (char* pos, int line, int column) {
this.pos = pos;
this.line = line;
this.column = column;
}
}
public enum Tracker.SparqlTokenType {
......
......@@ -63,7 +63,7 @@ public class Tracker.Store {
public string query;
public Cancellable cancellable;
public uint watchdog_id;
public SparqlQueryInThread in_thread;
public unowned SparqlQueryInThread in_thread;
~QueryTask () {
if (watchdog_id > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment