Use %zu, not %d, to format a size_t.