Fix use of flexible arrays with MSVC

Introduced by 0c80547.
This commit is contained in:
evpobr 2021-02-17 15:14:59 +05:00
parent 610c6392cb
commit 5d5eb6fed5
2 changed files with 8 additions and 0 deletions

View File

@ -1246,7 +1246,11 @@ psf_memset (void *s, int c, sf_count_t len)
** bodgy something up instead.
*/
#ifdef _MSC_VER
typedef SF_CUES_VAR (0) SF_CUES_0 ;
#else
typedef SF_CUES_VAR () SF_CUES_0 ;
#endif
/* calculate size of SF_CUES struct given number of cues */
#define SF_CUES_VAR_SIZE(count) (sizeof (SF_CUES_0) + count * sizeof (SF_CUE_POINT))

View File

@ -89,7 +89,11 @@ test_broadcast_var_set (void)
static void
test_broadcast_var_zero (void)
{ SF_PRIVATE sf_private, *psf ;
#ifdef _MSC_VER
SF_BROADCAST_INFO_VAR (0) bi ;
#else
SF_BROADCAST_INFO_VAR () bi ;
#endif
psf = &sf_private ;
memset (psf, 0, sizeof (sf_private)) ;