From 6d4296857019191a3563ecfbb0113dcf044f84cc Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Wed, 4 Oct 2017 18:24:56 -0400 Subject: [PATCH] swtpm_cert: add cast to avoid compile error on i686 Cast the exponent to unsigned long int to avoid a compiler error reporting comparison of signed and unsigned integers. Signed-off-by: Stefan Berger --- src/swtpm_cert/ek-cert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swtpm_cert/ek-cert.c b/src/swtpm_cert/ek-cert.c index 26b9c26..b8e9dab 100644 --- a/src/swtpm_cert/ek-cert.c +++ b/src/swtpm_cert/ek-cert.c @@ -524,7 +524,7 @@ main(int argc, char *argv[]) fprintf(stderr, "Exponent is wrong and cannot be 0.\n"); goto cleanup; } - if (exponent > UINT_MAX) { + if ((unsigned long int)exponent > UINT_MAX) { fprintf(stderr, "Exponent must fit into 32bits.\n"); goto cleanup; }