Merge pull request #49 from hzeller/fix-antlr-runtime-warnings
Fix warnings compiling antlr4 runtime.
diff --git a/src/API/PythonAPI.cpp b/src/API/PythonAPI.cpp
index 8028d69..4fdfca3 100644
--- a/src/API/PythonAPI.cpp
+++ b/src/API/PythonAPI.cpp
@@ -271,7 +271,7 @@
Py_DECREF(pArgs);
if (pValue != NULL) {
long int size;
- char* compName = PyUnicode_AsUTF8AndSize(pValue, &size);
+ const char* compName = PyUnicode_AsUTF8AndSize(pValue, &size);
if (compName == NULL) {
std::cout << "PYTHON API ERROR: Incorrect function return type, "
"expecting a string: "
diff --git a/src/CommandLine/CommandLineParser.cpp b/src/CommandLine/CommandLineParser.cpp
index 9ddccb7..e64a826 100644
--- a/src/CommandLine/CommandLineParser.cpp
+++ b/src/CommandLine/CommandLineParser.cpp
@@ -45,7 +45,7 @@
std::string CommandLineParser::m_versionNumber = "1.00";
const std::vector<std::string> copyright = {
- "Copyright (c) 2017-2019 Alain Dargelas,",
+ "Copyright (c) 2017-2019 Alain Dargelas,",
"http://www.apache.org/licenses/LICENSE-2.0"};
const std::vector<std::string> banner = {
@@ -293,7 +293,7 @@
if (tmp.size() && (tmp != prefix)) {
std::string def;
std::string value;
- unsigned int loc = tmp.find("=");
+ const size_t loc = tmp.find("=");
if (loc == std::string::npos) {
SymbolId id = m_symbolTable->registerSymbol(tmp);
container.insert(std::make_pair(id, std::string()));
@@ -381,7 +381,7 @@
std::string def;
std::string value;
std::string tmp = argv[i];
- unsigned int loc = tmp.find ("=");
+ const size_t loc = tmp.find ("=");
if (loc == std::string::npos)
{
StringUtils::registerEnvVar (def, "");