Avoid stringop-overflow diagnostic in testsuite

This commit is contained in:
Jeff Law 2020-12-07 21:42:27 -07:00
parent 628c33a547
commit 792f062a0e
2 changed files with 25 additions and 1 deletions

View File

@ -28,3 +28,24 @@ index 90fb3c3..1bce3ac 100644
// Map human readable Manufacturer String, if available,
// otherwise 4 byte ID was already padded and will be used.
diff --git a/test/unit/test_twist.c b/test/unit/test_twist.c
index ec66f69..54ec883 100644
--- a/test/unit/test_twist.c
+++ b/test/unit/test_twist.c
@@ -311,6 +311,8 @@ void test_twistbin_aappend_null_array(void **state) {
}
void test_twistbin_aappend_twist_null(void **state) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow="
(void) state;
twist expected = twist_new("foo");
@@ -322,6 +324,7 @@ void test_twistbin_aappend_twist_null(void **state) {
assert_ptr_equal((void * )actual, (void * )expected);
twist_free(actual);
+#pragma GCC diagnostic pop
}
void test_twistbin_create_null(void **state) {

View File

@ -7,7 +7,7 @@
Name: tpm2-pkcs11
Version: 1.5.0
Release: 1%{?candidate:.%{candidate}}%{?dist}
Release: 2%{?candidate:.%{candidate}}%{?dist}
Summary: PKCS#11 interface for TPM 2.0 hardware
License: BSD
@ -100,6 +100,9 @@ cd tools
%changelog
* Mon Dec 07 2020 Jeff Law <law@redhat.com> - 1.5.0-2
- Avoid stringop-overflow diagnostic in testsuite
* Wed Nov 18 2020 Jakub Jelen <jjelen@redhat.com> - 1.5.0-1
- New upstream release