and declare it ahead of time to avoid "error: 'for' loop initial declarations are only allowed in C99 mode"