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