summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-02-03 09:46:11 +0100
committerArmin Kuster <akuster808@gmail.com>2017-02-18 11:43:20 -0800
commit8d0cc9b00459438142d9a72fd85edce633c69da6 (patch)
treed6bd554c515770b9c78cece6df30efb6f392436e
parentb70a046ce482627edab0c347259c3a25de277d09 (diff)
downloadmeta-security-8d0cc9b00459438142d9a72fd85edce633c69da6.tar.gz
swtpm: fix compiler format warning
When building for x86-64, gcc complains: tpm_ioctl.c:866:9: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] | printf("ptm capability is 0x%llx\n", (uint64_t)devtoh64(is_chardev, cap)); | ^ | cc1: all warnings being treated as errors Casting to "long long unsigned" matches the format specifier in all cases, including those where "long long" is larger than 64 bits. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--recipes-tpm/swtpm/files/fix_signed_issue.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-tpm/swtpm/files/fix_signed_issue.patch b/recipes-tpm/swtpm/files/fix_signed_issue.patch
index 427df62..140585b 100644
--- a/recipes-tpm/swtpm/files/fix_signed_issue.patch
+++ b/recipes-tpm/swtpm/files/fix_signed_issue.patch
@@ -42,7 +42,7 @@ Index: git/src/swtpm_ioctl/tpm_ioctl.c
42 } 42 }
43 /* no tpm_result here */ 43 /* no tpm_result here */
44- printf("ptm capability is 0x%lx\n", (uint64_t)devtoh64(is_chardev, cap)); 44- printf("ptm capability is 0x%lx\n", (uint64_t)devtoh64(is_chardev, cap));
45+ printf("ptm capability is 0x%llx\n", (uint64_t)devtoh64(is_chardev, cap)); 45+ printf("ptm capability is 0x%llx\n", (long long unsigned)devtoh64(is_chardev, cap));
46 46
47 } else if (!strcmp(command, "-i")) { 47 } else if (!strcmp(command, "-i")) {
48 init.u.req.init_flags = htodev32(is_chardev, PTM_INIT_FLAG_DELETE_VOLATILE); 48 init.u.req.init_flags = htodev32(is_chardev, PTM_INIT_FLAG_DELETE_VOLATILE);