summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-01-06 01:32:27 +0000
committerJohn Hodge (Mutabah) <acessdev@gmail.com>2018-01-06 10:11:38 +0800
commit1966b5db6ab187e0f4b06eaf4c0bb8dcf9c4e217 (patch)
treee19754b70626470b6a20916602d25968f8706c31 /src
parent3aef468f515a05fcfd9a549e46f2991501a966d6 (diff)
downloadmrust-1966b5db6ab187e0f4b06eaf4c0bb8dcf9c4e217.tar.gz
main - fix incorrect type deduction with some gcc versions
GCC 6.4 on Alpine incorrectly deduces the type returned from ::std::strchr(const char *, char) as 'char *', instead of 'const char *', which causes the wrong constructor to be used. Closes #32.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 36fa106e..b23bb9e9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -773,7 +773,7 @@ ProgramParams::ProgramParams(int argc, char *argv[])
exit(1);
}
const char* desc = argv[++i];
- auto* pos = ::std::strchr(desc, '=');
+ const char* pos = ::std::strchr(desc, '=');
if( pos == nullptr ) {
::std::cerr << "--extern takes an argument of the format name=path" << ::std::endl;
exit(1);