Version 0.15.1. Drop upstreamed -format-spec patch.
This commit is contained in:
parent
9619599b71
commit
9585009128
@ -1,94 +0,0 @@
|
||||
diff --git a/src/check.h.in b/src/check.h.in
|
||||
index fdbc8b0..d1c494d 100644
|
||||
--- a/src/check.h.in
|
||||
+++ b/src/check.h.in
|
||||
@@ -1724,7 +1724,7 @@ do { \
|
||||
#define _ck_assert_ptr(X, OP, Y) do { \
|
||||
const void* _ck_x = (X); \
|
||||
const void* _ck_y = (Y); \
|
||||
- ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %#x, %s == %#x", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
|
||||
+ ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %#lx, %s == %#lx", #X" "#OP" "#Y, #X, (unsigned long)_ck_x, #Y, (unsigned long)_ck_y); \
|
||||
} while (0)
|
||||
|
||||
/* Pointer against NULL comparison macros with improved output
|
||||
@@ -1733,9 +1733,9 @@ do { \
|
||||
#define _ck_assert_ptr_null(X, OP) do { \
|
||||
const void* _ck_x = (X); \
|
||||
ck_assert_msg(_ck_x OP NULL, \
|
||||
- "Assertion '%s' failed: %s == %#x", \
|
||||
+ "Assertion '%s' failed: %s == %#lx", \
|
||||
#X" "#OP" NULL", \
|
||||
- #X, _ck_x); \
|
||||
+ #X, (unsigned long)_ck_x); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
diff --git a/src/check_error.c b/src/check_error.c
|
||||
index 865e7d5..02b40ae 100644
|
||||
--- a/src/check_error.c
|
||||
+++ b/src/check_error.c
|
||||
@@ -61,7 +61,7 @@ void *emalloc(size_t n)
|
||||
|
||||
p = malloc(n);
|
||||
if(p == NULL)
|
||||
- eprintf("malloc of %u bytes failed:", __FILE__, __LINE__ - 2, n);
|
||||
+ eprintf("malloc of %zu bytes failed:", __FILE__, __LINE__ - 2, n);
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,6 @@ void *erealloc(void *ptr, size_t n)
|
||||
|
||||
p = realloc(ptr, n);
|
||||
if(p == NULL)
|
||||
- eprintf("realloc of %u bytes failed:", __FILE__, __LINE__ - 2, n);
|
||||
+ eprintf("realloc of %zu bytes failed:", __FILE__, __LINE__ - 2, n);
|
||||
return p;
|
||||
}
|
||||
diff --git a/src/check_pack.c b/src/check_pack.c
|
||||
index f4f4c6a..1d4f959 100644
|
||||
--- a/src/check_pack.c
|
||||
+++ b/src/check_pack.c
|
||||
@@ -136,7 +136,7 @@ int pack(enum ck_msg_type type, char **buf, CheckMsg * msg)
|
||||
|
||||
len = pftab[type] (buf, msg);
|
||||
if(len > (size_t) INT_MAX)
|
||||
- eprintf("Value of len (%d) too big, max allowed %u\n",
|
||||
+ eprintf("Value of len (%zu) too big, max allowed %u\n",
|
||||
__FILE__, __LINE__ - 3, len, INT_MAX);
|
||||
return (int) len;
|
||||
}
|
||||
@@ -159,10 +159,10 @@ int upack(char *buf, CheckMsg * msg, enum ck_msg_type *type)
|
||||
|
||||
diff = buf - obuf;
|
||||
if(diff > (ptrdiff_t) INT_MAX)
|
||||
- eprintf("Value of diff (%t) too big, max allowed %u\n",
|
||||
+ eprintf("Value of diff (%td) too big, max allowed %d\n",
|
||||
__FILE__, __LINE__ - 3, diff, INT_MAX);
|
||||
if(diff > (ptrdiff_t) INT_MAX || diff < (ptrdiff_t) INT_MIN)
|
||||
- eprintf("Value of diff (%t) too small, min allowed %u\n",
|
||||
+ eprintf("Value of diff (%td) too small, min allowed %d\n",
|
||||
__FILE__, __LINE__ - 6, diff, INT_MIN);
|
||||
return (int) diff;
|
||||
}
|
||||
diff --git a/tests/check_check_master.c b/tests/check_check_master.c
|
||||
index aaf45f3..a157904 100644
|
||||
--- a/tests/check_check_master.c
|
||||
+++ b/tests/check_check_master.c
|
||||
@@ -589,7 +589,7 @@ START_TEST(test_check_failure_lnos)
|
||||
}
|
||||
|
||||
if (line_no > 0 && tr_lno(tr) != line_no) {
|
||||
- ck_abort_msg("For test %d (failure %d): Expected lno %d, got %d for suite %s, msg %s",
|
||||
+ ck_abort_msg("For test %d (failure %d): Expected lno %ld, got %d for suite %s, msg %s",
|
||||
i, number_failed, line_no, tr_lno(tr), tr_tcname(tr), tr_msg(tr));
|
||||
}
|
||||
}
|
||||
@@ -597,7 +597,7 @@ START_TEST(test_check_failure_lnos)
|
||||
/* At this point, there should be no remaining failures */
|
||||
line_no = get_next_failure_line_num(line_num_failures);
|
||||
ck_assert_msg(line_no == -1,
|
||||
- "No more failure line numbers expected, but found %d", line_no);
|
||||
+ "No more failure line numbers expected, but found %ld", line_no);
|
||||
}
|
||||
END_TEST
|
||||
|
36
check.spec
36
check.spec
@ -1,6 +1,6 @@
|
||||
Name: check
|
||||
Version: 0.15.0
|
||||
Release: 2%{?dist}
|
||||
Version: 0.15.1
|
||||
Release: 1%{?dist}
|
||||
Summary: A unit test framework for C
|
||||
Source0: https://github.com/libcheck/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
License: LGPLv2+
|
||||
@ -9,9 +9,6 @@ URL: http://libcheck.github.io/check/
|
||||
Patch0: %{name}-0.11.0-info-in-builddir.patch
|
||||
# Fix test failures due to varying floating point behavior across platforms
|
||||
Patch1: %{name}-0.11.0-fp.patch
|
||||
# Fix format specifiers that do not match their arguments
|
||||
# See https://github.com/libcheck/check/pull/271
|
||||
Patch2: %{name}-0.15.0-formatspec.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc
|
||||
@ -57,17 +54,11 @@ programs suitable for use with the Check unit test framework.
|
||||
%patch0 -p1 -b .info-in-builddir
|
||||
%endif
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
# Fix detection of various time-related function declarations
|
||||
sed -e '/DECLS(\[a/s|)|,,,[AC_INCLUDES_DEFAULT\n[#include <time.h>\n #include <sys/time.h>]]&|' \
|
||||
-i configure.ac
|
||||
|
||||
# Improve the info directory entry
|
||||
# See https://github.com/libcheck/check/pull/273
|
||||
sed -e 's/\(Check: (check)\)Introduction./\1. A unit testing framework for C./' \
|
||||
-i doc/check.texi
|
||||
|
||||
# Get rid of version control files
|
||||
find . -name .cvsignore -delete
|
||||
|
||||
@ -90,22 +81,11 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
||||
-e 's|CC="\(.*g..\)"|CC="\1 -Wl,--as-needed"|' \
|
||||
-i libtool
|
||||
|
||||
# Do not try to apply -Werror=format-security to the test code. Many tests
|
||||
# compute format strings on the fly, which causes that flag to trigger errors.
|
||||
# It's just test code; the library itself builds with the error enabled.
|
||||
sed -i 's/ -Werror=format-security//g' tests/Makefile
|
||||
|
||||
%make_build
|
||||
cd -
|
||||
|
||||
mkdir cmake_build
|
||||
cd cmake_build
|
||||
%cmake -DCHECK_ENABLE_TIMEOUT_TESTS:BOOL=OFF ..
|
||||
# See above
|
||||
sed -i 's/ -Werror=format-security//g' \
|
||||
$(grep -Frl -e ' -Werror=format-security' tests)
|
||||
%make_build
|
||||
cd -
|
||||
%cmake -DCHECK_ENABLE_TIMEOUT_TESTS:BOOL=OFF .
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
cd autotools_build
|
||||
@ -115,9 +95,7 @@ rm -rf %{buildroot}%{_infodir}/dir
|
||||
rm -rf %{buildroot}%{_docdir}/%{name}
|
||||
cd -
|
||||
|
||||
cd cmake_build
|
||||
%make_install
|
||||
cd -
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
cd autotools_build
|
||||
@ -161,6 +139,10 @@ cd -
|
||||
%{_mandir}/man1/checkmk.1*
|
||||
|
||||
%changelog
|
||||
* Thu Jul 23 2020 Jerry James <loganjerry@gmail.com> - 0.15.1-1
|
||||
- Version 0.15.1
|
||||
- Drop upstreamed -format-spec patch
|
||||
|
||||
* Tue Jun 23 2020 Jerry James <loganjerry@gmail.com> - 0.15.0-2
|
||||
- Drop -attribute-format patch, causes other issues (bz 1850198)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (check-0.15.0.tar.gz) = efde93977a38520b3b83a9e2f678d07b916fc27e41cf839a663900c4153d645fe4274ec3b7e2dabf475457f909f61734632c97b7257c49f5853fd11d920b0c84
|
||||
SHA512 (check-0.15.1.tar.gz) = e8f9cf21797457b1c29f68792a53321a19ae0f5af51ad1c4c5bfc350ba60d474c90545782bccade56350ced992b26872b1ef2bd0628863691bb95009ddacd30e
|
||||
|
Loading…
Reference in New Issue
Block a user