2
0
mirror of https://github.com/boostorg/spirit.git synced 2026-01-19 04:42:11 +00:00

Qi.Tests: rule1: Fixed -Wuninitialized warning

libs/spirit/test/qi/rule1.cpp:75:47: warning: variable 'start' is uninitialized when used within its own initialization [-Wuninitialized]
This commit is contained in:
Nikita Kniazev
2019-03-03 18:59:25 +03:00
parent f6297dc92f
commit fc39ec12c9
2 changed files with 6 additions and 3 deletions

View File

@@ -115,11 +115,12 @@ before_install:
# Ignore some warnings
feature.feature known-warnings : suppress : optional incidental propagated ;
toolset.flags gcc.compile OPTIONS <known-warnings>suppress :
-Wno-uninitialized -Wno-bool-operation -Wno-sign-compare : unchecked ;
-Wno-maybe-uninitialized # this warning is known to give false positives
-Wno-bool-operation -Wno-sign-compare : unchecked ;
toolset.flags clang-linux.compile OPTIONS <known-warnings>suppress :
-Wno-unused-command-line-argument # Sometimes it barks on -I and -stdlib
-Wno-nested-anon-types # Boost.Random
-Wno-uninitialized : unchecked ;
: unchecked ;
- |
# Determining the root branch

View File

@@ -72,7 +72,9 @@ main()
rule<char const*> a ('a');
rule<char const*> b ('b');
rule<char const*> c ('c');
rule<char const*> start = (a | b) >> (start | b);
rule<char const*> start;
start = (a | b) >> (start | b);
BOOST_TEST(test("aaaabababaaabbb", start));
BOOST_TEST(test("aaaabababaaabba", start, false));