diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index cc90a379f8..51cb1beeb9 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -1537,7 +1537,7 @@ bool tpm2_pcr_value_valid(const Tpm2PCRValue *pcr_value) { if (r < 0) return false; - if ((int) pcr_value->value.size != r) { + if (pcr_value->value.size != (size_t) r) { log_debug("PCR hash 0x%" PRIx16 " expected size %d does not match actual size %" PRIu16 ".", pcr_value->hash, r, pcr_value->value.size); return false;