[vlc-devel] [PATCH 2/2] cache: do not use alignof on expression
Marvin Scholz
epirat07 at gmail.com
Fri Aug 7 06:44:09 CEST 2020
Using alignof not on a type but an expression is a GNU extension and
causes the following warning:
warning: '_Alignof' applied to an expression is a GNU extension
---
src/modules/cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index c1428bd9f5b..ad2e44b5482 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -218,7 +218,7 @@ static int vlc_cache_load_config(module_config_t *cfg, block_t *file)
if (cfg->list_count)
{
- LOAD_ALIGNOF(*cfg->list.i);
+ LOAD_ALIGNOF(int);
}
LOAD_ARRAY(cfg->list.i, cfg->list_count);
@@ -535,7 +535,7 @@ static int CacheSaveConfig (FILE *file, const module_config_t *cfg)
if (cfg->list_count > 0)
{
- SAVE_ALIGNOF(*cfg->list.i);
+ SAVE_ALIGNOF(int);
}
for (unsigned i = 0; i < cfg->list_count; i++)
--
2.24.3 (Apple Git-128)
More information about the vlc-devel
mailing list