move up declarations and convert loop variable to size_t to avoid warnings
move up declarations and convert loop variable to size_t to avoid warnings

Yubico/yubico-c-client,kellyjf/yubi,Yubico/yubico-c-client,kellyjf/yubi,Yubico/yubico-c-client