Fix error build with MinGW and CYGWIN (#556)

When compiling, I got this error:

/lib-src/libnyquist/nyquist/nyqsrc/sndread.c: In function 'snd_make_read':
/lib-src/libnyquist/nyquist/nyqsrc/sndread.c:169:30: error: invalid operands to binary | (have 'int' and 'long int *')
  169 |         susp->sf_info.format |= format;
      |                              ^~

I would like to suggest this fix for this error.
This commit is contained in:
Carlo Bramini 2020-06-03 20:16:28 +02:00 committed by Leland Lucius
parent 3dfc9d6dec
commit 6181f406fd
1 changed files with 2 additions and 3 deletions

View File

@ -161,12 +161,11 @@ LVAL snd_make_read(
/* write the code so it will only compile if one and only one
ENDIAN setting is defined */
#ifdef XL_LITTLE_ENDIAN
long format = SF_ENDIAN_BIG;
susp->sf_info.format |= SF_ENDIAN_BIG;
#endif
#ifdef XL_BIG_ENDIAN
long format = SF_ENDIAN_LITTLE;
susp->sf_info.format |= SF_ENDIAN_LITTLE;
#endif
susp->sf_info.format |= format;
}
susp->sndfile = NULL;