Cast first argument for %.*s to int

This commit is contained in:
Tobias Brunner
2013-01-24 23:35:42 +01:00
parent bacbf91c5c
commit 677812dc66
5 changed files with 18 additions and 18 deletions
@@ -827,7 +827,7 @@ METHOD(attest_db_t, list_devices, void,
{
if (id != last_id)
{
printf("%4d: %.*s\n", id, value.len, value.ptr);
printf("%4d: %.*s\n", id, (int)value.len, value.ptr);
device_count++;
last_id = id;
}
+2 -2
View File
@@ -344,8 +344,8 @@ METHOD(pts_t, set_platform_info, void,
/* platform info is a concatenation of OS name and OS version */
free(this->platform_info);
this->platform_info = malloc(len);
snprintf(this->platform_info, len, "%.*s %.*s", name.len, name.ptr,
version.len, version.ptr);
snprintf(this->platform_info, len, "%.*s %.*s", (int)name.len, name.ptr,
(int)version.len, version.ptr);
}
METHOD(pts_t, get_tpm_version_info, bool,