nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0138-tpm-fix-warnings-when-compiling-for-platforms-other-.patch

d9d99f
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d9d99f
From: Michael Marineau <michael.marineau@coreos.com>
d9d99f
Date: Sun, 21 Aug 2016 18:24:58 -0700
d9d99f
Subject: [PATCH] tpm: fix warnings when compiling for platforms other than pc
d9d99f
 and efi
d9d99f
d9d99f
---
d9d99f
 include/grub/tpm.h | 17 +++++++++++------
d9d99f
 1 file changed, 11 insertions(+), 6 deletions(-)
d9d99f
d9d99f
diff --git a/include/grub/tpm.h b/include/grub/tpm.h
b71686
index ecb2d09ff..972a5edc8 100644
d9d99f
--- a/include/grub/tpm.h
d9d99f
+++ b/include/grub/tpm.h
d9d99f
@@ -75,12 +75,17 @@ grub_err_t grub_tpm_execute(PassThroughToTPM_InputParamBlock *inbuf,
d9d99f
 grub_err_t grub_tpm_log_event(unsigned char *buf, grub_size_t size,
d9d99f
 			      grub_uint8_t pcr, const char *description);
d9d99f
 #else
d9d99f
-static inline grub_err_t grub_tpm_execute(PassThroughToTPM_InputParamBlock *inbuf,
d9d99f
-					  PassThroughToTPM_OutputParamBlock *outbuf) { return 0; };
d9d99f
-static inline grub_err_t grub_tpm_log_event(unsigned char *buf,
d9d99f
-					    grub_size_t size,
d9d99f
-					    grub_uint8_t pcr,
d9d99f
-					    const char *description)
d9d99f
+static inline grub_err_t grub_tpm_execute(
d9d99f
+	PassThroughToTPM_InputParamBlock *inbuf __attribute__ ((unused)),
d9d99f
+	PassThroughToTPM_OutputParamBlock *outbuf __attribute__ ((unused)))
d9d99f
+{
d9d99f
+	return 0;
d9d99f
+};
d9d99f
+static inline grub_err_t grub_tpm_log_event(
d9d99f
+	unsigned char *buf __attribute__ ((unused)),
d9d99f
+	grub_size_t size __attribute__ ((unused)),
d9d99f
+	grub_uint8_t pcr __attribute__ ((unused)),
d9d99f
+	const char *description __attribute__ ((unused)))
d9d99f
 {
d9d99f
 	return 0;
d9d99f
 };