lunarmodules/lua-compat-5.3

src/compat-5.3.c:451:42: error: initializer element is not computable at load time [-Werror=pedantic]

Closed this issue · 2 comments

With compat-5.3.[ch] from 73fb49f I get following error:

gcc -O2 -fPIC -std=c89 -pedantic -Wall -Werror -O0 -g --coverage -D_XOPEN_SOURCE=600 -DPACKAGE_STRING="\"LuaLDAP 1.2.3\"" -DLUA_C89_NUMBERS -I/opt/luaenv/versions/5.1.5/include -I/usr/include -I/usr/include -I../compat/src   -c -o src/lualdap.o src/lualdap.c
In file included from src/compat-5.3.h:419:0,
                 from src/lualdap.c:26:
src/compat-5.3.c: In function 'compat53_load_53':
src/compat-5.3.c:451:42: error: initializer element is not computable at load time [-Werror=pedantic]
   compat53_reader_data compat53_data = { reader, data, 1, 0, 0 };
                                          ^~~~~~
src/compat-5.3.c:451:50: error: initializer element is not computable at load time [-Werror=pedantic]
   compat53_reader_data compat53_data = { reader, data, 1, 0, 0 };
                                                  ^~~~
cc1: all warnings being treated as errors

For details see:

Thanks for the reports.