From fc8784e07e1daada5ff1a652098628f039a62850 Mon Sep 17 00:00:00 2001 From: Kamil Date: Sat, 7 Apr 2018 01:00:42 +0200 Subject: [PATCH] Fix HAVE_ASPRINTF detection gcc6 introduceed a new warning switched with -Wmisleading-identation. This caused to generate a compilation warning for if statement misleadingly indented, which caused HAVE_ASPRINTF to be defined as 0. Adding newline after an if statement fixes the problem. --- tools/configurator/configurator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index ecf8f9f5..2e5b09c2 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -102,7 +102,8 @@ static struct test tests[] = { "#include \n" "static char *func(int x) {" " char *p;\n" - " if (asprintf(&p, \"%u\", x) == -1) p = NULL;" + " if (asprintf(&p, \"%u\", x) == -1) \n" + " p = NULL;\n" " return p;\n" "}" }, { "HAVE_ATTRIBUTE_COLD", DEFINES_FUNC, NULL, NULL, -- 2.39.2