From 792f062a0e4a8e9ef58c9b6f83e9eb7405a1e7c6 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 7 Dec 2020 21:42:27 -0700 Subject: [PATCH] Avoid stringop-overflow diagnostic in testsuite --- tpm2-pkcs11-gcc11.patch | 21 +++++++++++++++++++++ tpm2-pkcs11.spec | 5 ++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/tpm2-pkcs11-gcc11.patch b/tpm2-pkcs11-gcc11.patch index 92fb2f7..fdbb106 100644 --- a/tpm2-pkcs11-gcc11.patch +++ b/tpm2-pkcs11-gcc11.patch @@ -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) { diff --git a/tpm2-pkcs11.spec b/tpm2-pkcs11.spec index d80a46f..19db178 100644 --- a/tpm2-pkcs11.spec +++ b/tpm2-pkcs11.spec @@ -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 - 1.5.0-2 +- Avoid stringop-overflow diagnostic in testsuite + * Wed Nov 18 2020 Jakub Jelen - 1.5.0-1 - New upstream release