bpo-29565: Fix compilation for C89 (GH-8626)

Use a local scope for the 'i' variable.
1 file changed