gbaconv

A set of tools aimed at GameBoy Advance developers
Log | Files | Refs | README | LICENSE

commit 2a7835b4205168192533ca5fcaea86dfb100cbe5
parent 6e5824cd7f888b7a52ea250f3ccb7e6233ac37e5
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 21 Feb 2019 22:57:33 +0100

Use size_t type for loop, and declare it in the initializer.

Diffstat:
Mwav2gba.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/wav2gba.c b/wav2gba.c @@ -42,8 +42,6 @@ struct wave_header { unsigned int data_chunk_size; } wave_header; -int loop; - int main(int argc, char *argv[]) { if (argc != 4) { printf("USAGE: wav2gba input.wav output.inc array_name (Input File must be 8-bit, MONO)\n\n"); @@ -100,7 +98,7 @@ int main(int argc, char *argv[]) { fprintf(output_file, "const s8 %s[] = {\n", argv[3]); - for (loop = WAVE_HEADER_LENGTH; loop < input_file_size; loop++) { + for (size_t loop = WAVE_HEADER_LENGTH; loop < input_file_size; loop++) { fprintf(output_file, "0x%x,", input_file_buffer[loop]+128); }