Fix ISO C build breakage. (#1255) ISO C prohibits inline declarations of variables. Move the declaration to the start of the block. Co-authored-by: Eugene Kliuchnikov <eustas.ru@gmail.com>