runtime: silence some -Wformat warnings (NFC)

Use `z` rather than `l` for the modifier as the values are `size_t`
rather than `long`.  This fixes a bit of warning spew on Windows.
This commit is contained in:
Saleem Abdulrasool
2023-08-04 08:41:56 -07:00
parent bf666d1a79
commit da314bc7d7

View File

@@ -1474,7 +1474,7 @@ checkGenericPackRequirement(const GenericRequirementDescriptor &req,
const char *protoName =
req.getProtocol() ? req.getProtocol().getName() : "<null>";
return TYPE_LOOKUP_ERROR_FMT(
"subject type %.*s does not conform to protocol %s at pack index %lu",
"subject type %.*s does not conform to protocol %s at pack index %zu",
(int)req.getParam().size(), req.getParam().data(), protoName, i);
}
@@ -1505,7 +1505,7 @@ checkGenericPackRequirement(const GenericRequirementDescriptor &req,
if (subjectType.getNumElements() != constraintType.getNumElements()) {
return TYPE_LOOKUP_ERROR_FMT(
"mismatched pack lengths in same-type pack requirement %.*s: %lu vs %lu",
"mismatched pack lengths in same-type pack requirement %.*s: %zu vs %zu",
(int)req.getParam().size(), req.getParam().data(),
subjectType.getNumElements(), constraintType.getNumElements());
}
@@ -1516,7 +1516,7 @@ checkGenericPackRequirement(const GenericRequirementDescriptor &req,
if (subjectElt != constraintElt) {
return TYPE_LOOKUP_ERROR_FMT(
"subject type %.*s does not match %.*s at pack index %lu",
"subject type %.*s does not match %.*s at pack index %zu",
(int)req.getParam().size(),
req.getParam().data(), (int)req.getMangledTypeName().size(),
req.getMangledTypeName().data(), i);
@@ -1551,7 +1551,7 @@ checkGenericPackRequirement(const GenericRequirementDescriptor &req,
if (!isSubclassOrExistential(elt, baseType))
return TYPE_LOOKUP_ERROR_FMT(
"%.*s is not subclass of %.*s at pack index %lu",
"%.*s is not subclass of %.*s at pack index %zu",
(int)req.getParam().size(),
req.getParam().data(), (int)req.getMangledTypeName().size(),
req.getMangledTypeName().data(), i);
@@ -1576,7 +1576,7 @@ checkGenericPackRequirement(const GenericRequirementDescriptor &req,
if (subjectType.getNumElements() != otherType.getNumElements()) {
return TYPE_LOOKUP_ERROR_FMT("same-shape requirement unsatisfied; "
"%lu != %lu",
"%zu != %zu",
subjectType.getNumElements(),
otherType.getNumElements() );
}