Commit cb16e7ec authored by Michiel Verloop's avatar Michiel Verloop
Browse files

Potential CI fixes.

• Fix wrong calls to CTIabort
• Potential fix to ignore -Wformat-zero-length in a few test cases.
parent a35ac900
...@@ -37,7 +37,7 @@ MACOSgetSysroot () ...@@ -37,7 +37,7 @@ MACOSgetSysroot ()
ret = SYSexec_and_read_output ("/usr/bin/xcrun --show-sdk-path", &a); ret = SYSexec_and_read_output ("/usr/bin/xcrun --show-sdk-path", &a);
if (ret != 0) if (ret != 0)
{ {
CTIabort ("xcode-select failed with: %s", a); CTIabort (EMPTY_LOC, "xcode-select failed with: %s", a);
} }
STRstrip (a); STRstrip (a);
#else #else
...@@ -63,7 +63,7 @@ MACOSgetSDKVer () ...@@ -63,7 +63,7 @@ MACOSgetSDKVer ()
int ret = SYSexec_and_read_output ("/usr/bin/xcrun --show-sdk-version 2>/dev/null", &v); int ret = SYSexec_and_read_output ("/usr/bin/xcrun --show-sdk-version 2>/dev/null", &v);
if (ret != 0) if (ret != 0)
{ {
CTIabort ("xcrun failed with: %s", v); CTIabort (EMPTY_LOC, "xcrun failed with: %s", v);
} }
STRstrip (v); STRstrip (v);
#else #else
......
...@@ -32,7 +32,9 @@ TEST (CTF, testCreateMessageBeginSingleLineNoWrapping) ...@@ -32,7 +32,9 @@ TEST (CTF, testCreateMessageBeginSingleLineNoWrapping)
// Ensure that we don't get a trailing enter in the base case // Ensure that we don't get a trailing enter in the base case
header = SBUFcreate (0); header = SBUFcreate (0);
#pragma GCC diagnostic ignored "-Wformat-zero-length"
remaining_lines = CTFcreateMessageBegin (header, ""); remaining_lines = CTFcreateMessageBegin (header, "");
#pragma GCC diagnostic warning "-Wformat-zero-length"
EXPECT_TRUE (SBUFisEmpty (header)); EXPECT_TRUE (SBUFisEmpty (header));
EXPECT_TRUE (SBUFisEmpty (remaining_lines)); EXPECT_TRUE (SBUFisEmpty (remaining_lines));
SBUFfree (remaining_lines); SBUFfree (remaining_lines);
...@@ -71,7 +73,9 @@ TEST (CTF, testCreateMessageBeginMultiLineNoWrapping) ...@@ -71,7 +73,9 @@ TEST (CTF, testCreateMessageBeginMultiLineNoWrapping)
// Ensure that we still get a newline if we give empty inputs // Ensure that we still get a newline if we give empty inputs
header = SBUFcreate (0); header = SBUFcreate (0);
#pragma GCC diagnostic ignored "-Wformat-zero-length"
remaining_lines = CTFcreateMessageBegin (header, ""); remaining_lines = CTFcreateMessageBegin (header, "");
#pragma GCC diagnostic warning "-Wformat-zero-length"
EXPECT_STREQ ("\n", SBUFgetBuffer (header)); EXPECT_STREQ ("\n", SBUFgetBuffer (header));
EXPECT_TRUE (SBUFisEmpty (remaining_lines)); EXPECT_TRUE (SBUFisEmpty (remaining_lines));
SBUFfree (remaining_lines); SBUFfree (remaining_lines);
...@@ -140,7 +144,9 @@ TEST (CTF, testCreateMessageBeginMultiLineWrapping) ...@@ -140,7 +144,9 @@ TEST (CTF, testCreateMessageBeginMultiLineWrapping)
// Ensure that we get a trailing enter in the base case // Ensure that we get a trailing enter in the base case
header = SBUFcreate (0); header = SBUFcreate (0);
#pragma GCC diagnostic ignored "-Wformat-zero-length"
remaining_lines = CTFcreateMessageBegin (header, ""); remaining_lines = CTFcreateMessageBegin (header, "");
#pragma GCC diagnostic warning "-Wformat-zero-length"
EXPECT_STREQ ("\n", SBUFgetBuffer (header)); EXPECT_STREQ ("\n", SBUFgetBuffer (header));
EXPECT_TRUE (SBUFisEmpty (remaining_lines)); EXPECT_TRUE (SBUFisEmpty (remaining_lines));
SBUFfree (remaining_lines); SBUFfree (remaining_lines);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment