Drop -attribute-format patch, causes other issues (bz 1850198).
This commit is contained in:
parent
6af302c26b
commit
8cc14c0339
@ -1,90 +0,0 @@
|
|||||||
diff --git a/src/check.c b/src/check.c
|
|
||||||
index f74b384..89df345 100644
|
|
||||||
--- a/src/check.c
|
|
||||||
+++ b/src/check.c
|
|
||||||
@@ -362,25 +362,24 @@ void _mark_point(const char *file, int line)
|
|
||||||
send_loc_info(file, line);
|
|
||||||
}
|
|
||||||
|
|
||||||
-void _ck_assert_failed(const char *file, int line, const char *expr, ...)
|
|
||||||
+void _ck_assert_failed(const char *file, int line, const char *expr,
|
|
||||||
+ const char *msg, ...)
|
|
||||||
{
|
|
||||||
- const char *msg;
|
|
||||||
- va_list ap;
|
|
||||||
char buf[BUFSIZ];
|
|
||||||
const char *to_send;
|
|
||||||
|
|
||||||
send_loc_info(file, line);
|
|
||||||
|
|
||||||
- va_start(ap, expr);
|
|
||||||
- msg = (const char *)va_arg(ap, char *);
|
|
||||||
-
|
|
||||||
/*
|
|
||||||
* If a message was passed, format it with vsnprintf.
|
|
||||||
* Otherwise, print the expression as is.
|
|
||||||
*/
|
|
||||||
if(msg != NULL)
|
|
||||||
{
|
|
||||||
+ va_list ap;
|
|
||||||
+ va_start(ap, msg);
|
|
||||||
vsnprintf(buf, BUFSIZ, msg, ap);
|
|
||||||
+ va_end(ap);
|
|
||||||
to_send = buf;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -388,7 +387,6 @@ void _ck_assert_failed(const char *file, int line, const char *expr, ...)
|
|
||||||
to_send = expr;
|
|
||||||
}
|
|
||||||
|
|
||||||
- va_end(ap);
|
|
||||||
send_failure_info(to_send);
|
|
||||||
if(cur_fork_status() == CK_FORK)
|
|
||||||
{
|
|
||||||
diff --git a/src/check.h.in b/src/check.h.in
|
|
||||||
index fdbc8b0..9baddc9 100644
|
|
||||||
--- a/src/check.h.in
|
|
||||||
+++ b/src/check.h.in
|
|
||||||
@@ -480,7 +480,7 @@ static void __testname ## _fn (int _i CK_ATTRIBUTE_UNUSED)
|
|
||||||
*/
|
|
||||||
#define fail_if(expr, ...)\
|
|
||||||
(expr) ? \
|
|
||||||
- _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__, NULL) \
|
|
||||||
+ _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__) \
|
|
||||||
: _mark_point(__FILE__, __LINE__)
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -500,11 +500,12 @@ static void __testname ## _fn (int _i CK_ATTRIBUTE_UNUSED)
|
|
||||||
*/
|
|
||||||
#if @HAVE_FORK@
|
|
||||||
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
|
|
||||||
- const char *expr,
|
|
||||||
- ...) CK_ATTRIBUTE_NORETURN CK_ATTRIBUTE_FORMAT(gnu_printf, 3, 4);
|
|
||||||
+ const char *expr, const char *msg,
|
|
||||||
+ ...) CK_ATTRIBUTE_NORETURN CK_ATTRIBUTE_FORMAT(gnu_printf, 4, 5);
|
|
||||||
#else
|
|
||||||
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
|
|
||||||
- const char *expr, ...) CK_ATTRIBUTE_FORMAT(gnu_printf, 3, 4);
|
|
||||||
+ const char *expr, const char *msg,
|
|
||||||
+ ...) CK_ATTRIBUTE_FORMAT(gnu_printf, 4, 5);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -534,7 +535,7 @@ CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
|
|
||||||
#define ck_assert_msg(expr, ...) \
|
|
||||||
(expr) ? \
|
|
||||||
_mark_point(__FILE__, __LINE__) : \
|
|
||||||
- _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
|
|
||||||
+ _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unconditionally fail the test
|
|
||||||
@@ -553,7 +554,7 @@ CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
|
|
||||||
*
|
|
||||||
* @since 0.9.6
|
|
||||||
*/
|
|
||||||
-#define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
|
|
||||||
+#define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__)
|
|
||||||
|
|
||||||
/* Signed and unsigned integer comparison macros with improved output compared to ck_assert(). */
|
|
||||||
/* OP may be any comparison operator. */
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: check
|
Name: check
|
||||||
Version: 0.15.0
|
Version: 0.15.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A unit test framework for C
|
Summary: A unit test framework for C
|
||||||
Source0: https://github.com/libcheck/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/libcheck/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -12,9 +12,6 @@ Patch1: %{name}-0.11.0-fp.patch
|
|||||||
# Fix format specifiers that do not match their arguments
|
# Fix format specifiers that do not match their arguments
|
||||||
# See https://github.com/libcheck/check/pull/271
|
# See https://github.com/libcheck/check/pull/271
|
||||||
Patch2: %{name}-0.15.0-formatspec.patch
|
Patch2: %{name}-0.15.0-formatspec.patch
|
||||||
# Make CK_ATTRIBUTE_FORMAT refer to the right arguments
|
|
||||||
# See https://github.com/libcheck/check/pull/272
|
|
||||||
Patch3: %{name}-0.15.0-attribute-format.patch
|
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -165,6 +162,9 @@ cd -
|
|||||||
%{_mandir}/man1/checkmk.1*
|
%{_mandir}/man1/checkmk.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 23 2020 Jerry James <loganjerry@gmail.com> - 0.15.0-2
|
||||||
|
- Drop -attribute-format patch, causes other issues (bz 1850198)
|
||||||
|
|
||||||
* Mon Jun 22 2020 Jerry James <loganjerry@gmail.com> - 0.15.0-1
|
* Mon Jun 22 2020 Jerry James <loganjerry@gmail.com> - 0.15.0-1
|
||||||
- Version 0.15.0
|
- Version 0.15.0
|
||||||
- Add -formatspec and -attribute-format patches
|
- Add -formatspec and -attribute-format patches
|
||||||
|
Loading…
Reference in New Issue
Block a user