diff options
| author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2019-02-07 21:21:05 +0100 |
|---|---|---|
| committer | Peter Korsgaard <peter@korsgaard.com> | 2019-02-07 22:42:13 +0100 |
| commit | ab59727b38429c2338d8d0c85a263a587a199283 (patch) | |
| tree | 3a08771282d856133b7d032b71ad5d5536c26d41 | |
| parent | 3f6587266e6cef81918f24c0c1c2bf9a654a2ac1 (diff) | |
| download | buildroot-ab59727b38429c2338d8d0c85a263a587a199283.tar.gz buildroot-ab59727b38429c2338d8d0c85a263a587a199283.zip | |
package/tpm2-tss: fix build with gcc <= 4.8
Fixes:
- http://autobuild.buildroot.org/results/8d7b6dad6602fe67338abc696bc4752dda8e9717
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| -rw-r--r-- | package/tpm2-tss/0001-tpm2b-types.c-fix-maybe-uninitialized-error.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/package/tpm2-tss/0001-tpm2b-types.c-fix-maybe-uninitialized-error.patch b/package/tpm2-tss/0001-tpm2b-types.c-fix-maybe-uninitialized-error.patch new file mode 100644 index 0000000000..7125835711 --- /dev/null +++ b/package/tpm2-tss/0001-tpm2b-types.c-fix-maybe-uninitialized-error.patch @@ -0,0 +1,37 @@ +From 815f2bcbdfe5d9aff2cd3acbbb105daf1f5e9d7f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Thu, 7 Feb 2019 09:58:07 +0100 +Subject: [PATCH] tpm2b-types.c: fix maybe-uninitialized error + +src/tss2-mu/tpm2b-types.c: In function 'Tss2_MU_TPM2B_ECC_POINT_Marshal': +src/tss2-mu/tpm2b-types.c:201:24: error: 'ptr' may be used uninitialized in this function [-Werror=maybe-uninitialized] + *(UINT16 *)ptr = HOST_TO_BE_16(buffer + local_offset - ptr - 2); \ + ^ +src/tss2-mu/tpm2b-types.c:152:12: note: 'ptr' was declared here + UINT8 *ptr; \ + +Fixes: + - http://autobuild.buildroot.org/results/8d7b6dad6602fe67338abc696bc4752dda8e9717 + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Upstream status: https://github.com/tpm2-software/tpm2-tss/pull/1265] +--- + src/tss2-mu/tpm2b-types.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tss2-mu/tpm2b-types.c b/src/tss2-mu/tpm2b-types.c +index 9c1003ab..7632febb 100644 +--- a/src/tss2-mu/tpm2b-types.c ++++ b/src/tss2-mu/tpm2b-types.c +@@ -150,7 +150,7 @@ TSS2_RC Tss2_MU_##type##_Marshal(type const *src, uint8_t buffer[], \ + size_t buffer_size, size_t *offset) \ + { \ + size_t local_offset = 0; \ +- UINT8 *ptr; \ ++ UINT8 *ptr = NULL; \ + TSS2_RC rc; \ + \ + if (src == NULL) { \ +-- +2.14.1 + |

