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 ()
ret = SYSexec_and_read_output ("/usr/bin/xcrun --show-sdk-path", &a);
if (ret != 0)
{
CTIabort ("xcode-select failed with: %s", a);
CTIabort (EMPTY_LOC, "xcode-select failed with: %s", a);
}
STRstrip (a);
#else
......@@ -63,7 +63,7 @@ MACOSgetSDKVer ()
int ret = SYSexec_and_read_output ("/usr/bin/xcrun --show-sdk-version 2>/dev/null", &v);
if (ret != 0)
{
CTIabort ("xcrun failed with: %s", v);
CTIabort (EMPTY_LOC, "xcrun failed with: %s", v);
}
STRstrip (v);
#else
......
......@@ -32,7 +32,9 @@ TEST (CTF, testCreateMessageBeginSingleLineNoWrapping)
// Ensure that we don't get a trailing enter in the base case
header = SBUFcreate (0);
#pragma GCC diagnostic ignored "-Wformat-zero-length"
remaining_lines = CTFcreateMessageBegin (header, "");
#pragma GCC diagnostic warning "-Wformat-zero-length"
EXPECT_TRUE (SBUFisEmpty (header));
EXPECT_TRUE (SBUFisEmpty (remaining_lines));
SBUFfree (remaining_lines);
......@@ -71,7 +73,9 @@ TEST (CTF, testCreateMessageBeginMultiLineNoWrapping)
// Ensure that we still get a newline if we give empty inputs
header = SBUFcreate (0);
#pragma GCC diagnostic ignored "-Wformat-zero-length"
remaining_lines = CTFcreateMessageBegin (header, "");
#pragma GCC diagnostic warning "-Wformat-zero-length"
EXPECT_STREQ ("\n", SBUFgetBuffer (header));
EXPECT_TRUE (SBUFisEmpty (remaining_lines));
SBUFfree (remaining_lines);
......@@ -140,7 +144,9 @@ TEST (CTF, testCreateMessageBeginMultiLineWrapping)
// Ensure that we get a trailing enter in the base case
header = SBUFcreate (0);
#pragma GCC diagnostic ignored "-Wformat-zero-length"
remaining_lines = CTFcreateMessageBegin (header, "");
#pragma GCC diagnostic warning "-Wformat-zero-length"
EXPECT_STREQ ("\n", SBUFgetBuffer (header));
EXPECT_TRUE (SBUFisEmpty (remaining_lines));
SBUFfree (remaining_lines);
......
Markdown is supported
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