mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 01:49:53 +00:00
Fix use of flexible arrays with MSVC
Introduced by 0c80547.
This commit is contained in:
parent
610c6392cb
commit
5d5eb6fed5
@ -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))
|
||||
|
@ -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)) ;
|
||||
|
Loading…
Reference in New Issue
Block a user