Eliminate C99isms so it compiles in MSVC, and comment out some unused variables to silence warnings

This commit is contained in:
Chris Moeller 2014-08-02 20:51:21 -07:00
parent 3dda6329fc
commit 4a573f48a4

View File

@ -7,6 +7,14 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
coding_t coding_type;
off_t head_offset;
/*off_t seek_offset;*/
int codec_number;
int channel_count;
int loop_flag;
off_t start_offset;
int big_endian = 1;
int ima = 0;
int32_t(*read_32bit)(off_t, STREAMFILE*) = NULL;
@ -14,14 +22,6 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
read_16bit = read_16bitBE;
read_32bit = read_32bitBE;
off_t head_offset;
off_t seek_offset;
int codec_number;
int channel_count;
int loop_flag;
off_t start_offset;
/* check extension, case insensitive */
streamFile->get_name(streamFile, filename, sizeof(filename));
if (strcasecmp("bfwav", filename_extension(filename)))
@ -107,15 +107,17 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
if (vgmstream->coding_type == coding_NGC_DSP) {
off_t coef_offset;
off_t coef_offset1;
off_t coef_offset2;
/*off_t coef_offset1;
off_t coef_offset2;*/
int coef_spacing;
int i, j;
off_t coeffheader;
int foundcoef;
coef_spacing = 0x2E;
off_t coeffheader = head_offset + 0x28;
int foundcoef = 0;
coeffheader = head_offset + 0x28;
foundcoef = 0;
while (!(foundcoef))
{
if ((uint32_t)read_32bit(coeffheader, streamFile) == 0x1F000000)