diff options
author | 2019-12-19 15:49:36 +0200 | |
---|---|---|
committer | 2019-12-19 15:49:36 +0200 | |
commit | ec8f61e98e7e644c0610defd46fcba184f896e2b (patch) | |
tree | 169f0ac37d44c880e1aa8f5343f32b71aaedfcea /test | |
parent | 89d17b4f3dfd4f6503ce48e206b211c3bfb8dcee (diff) | |
download | librin-ec8f61e98e7e644c0610defd46fcba184f896e2b.tar.gz librin-ec8f61e98e7e644c0610defd46fcba184f896e2b.tar.bz2 librin-ec8f61e98e7e644c0610defd46fcba184f896e2b.zip |
tests: fix undefined behaviour.
When aggressive optimizations are enabled, compiler hits undefined behaviour
during loop unrolling. Fix this to allow safely unrolling the offending loop.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/diagnostic.c b/test/diagnostic.c index 56a8a65..866f9f2 100644 --- a/test/diagnostic.c +++ b/test/diagnostic.c @@ -126,7 +126,7 @@ static int format_test(void) static const char *expected_warn[] = {"warning:format_test:\n", "", "warning:format_test:%08lx:message is 3\n", "warningwarningwarningwarning"}; static const char *expected_fixme[] = {"fixme:format_test:\n", "", "fixme:format_test:%08lx:message is 3\n", "fixmefixmefixmefixme"}; static const char *expected_info[] = {"info:format_test:\n", "", "info:format_test:%08lx:message is 3\n", "infoinfoinfoinfo"}; - static const char *msg[] = {"", "", "message is %zu"}; + static const char *msg[] = {"", "", "message is %zu", ""}; /* `ninja test` seems to be intercepting stdout, so we cannot test the default outstream */ |