summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2016-06-21 15:56:18 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2016-07-01 09:59:47 +0000
commit11c43c160ce9681acbe300f1e75fecf4ffe52bda (patch)
tree4b083180c7477e0eadc6123920693173901efb07
parentf72851b449be5e4719124421304bd2a3b4281df5 (diff)
downloadqtivi-11c43c160ce9681acbe300f1e75fecf4ffe52bda.tar.gz
Fixed a warning in the code generated by flex
Change-Id: I7f4e3236bdd4d7df77163d931e7dbec5267ea1a0 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r--src/ivicore/queryparser/qiviqueryparser.g6
-rw-r--r--src/ivicore/queryparser/qiviqueryparser_p.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ivicore/queryparser/qiviqueryparser.g b/src/ivicore/queryparser/qiviqueryparser.g
index 9cb0288..680c70f 100644
--- a/src/ivicore/queryparser/qiviqueryparser.g
+++ b/src/ivicore/queryparser/qiviqueryparser.g
@@ -219,6 +219,10 @@ QIviQueryParser::QIviQueryParser():
reallocateStack();
}
+//This is needed to comparison warning in the generated flex code.
+#define YY_TYPEDEF_YY_SIZE_T
+typedef int yy_size_t;
+
#include "qiviqueryparser_flex_p.h"
QIviQueryParser::~QIviQueryParser()
@@ -658,7 +662,7 @@ void QIviQueryParser::setErrorString(const QString &error)
for (int i=0; i<err_col; i++)
marker.prepend(QLatin1String(" "));
- for (unsigned long i=0; i<yyleng - 1; i++)
+ for (int i=0; i<yyleng - 1; i++)
marker.append(QLatin1String("-"));
m_error.append(marker);
diff --git a/src/ivicore/queryparser/qiviqueryparser_p.h b/src/ivicore/queryparser/qiviqueryparser_p.h
index f38b9b4..2a28066 100644
--- a/src/ivicore/queryparser/qiviqueryparser_p.h
+++ b/src/ivicore/queryparser/qiviqueryparser_p.h
@@ -343,6 +343,10 @@ QIviQueryParser::QIviQueryParser():
reallocateStack();
}
+//This is needed to comparison warning in the generated flex code.
+#define YY_TYPEDEF_YY_SIZE_T
+typedef int yy_size_t;
+
#include "qiviqueryparser_flex_p.h"
QIviQueryParser::~QIviQueryParser()
@@ -708,7 +712,7 @@ void QIviQueryParser::setErrorString(const QString &error)
for (int i=0; i<err_col; i++)
marker.prepend(QLatin1String(" "));
- for (unsigned long i=0; i<yyleng - 1; i++)
+ for (int i=0; i<yyleng - 1; i++)
marker.append(QLatin1String("-"));
m_error.append(marker);