Closed rkgrep closed 6 years ago
Build fails on alpine linux due to ISO C90 standards:
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I./ -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_hashids.o pg_hashids.c pg_hashids.c: In function 'id_decode': pg_hashids.c:154:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] unsigned long long *resultValues = (unsigned long long *)ARR_DATA_PTR(resultArray); ^~~~~~~~ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I./ -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o hashids.o hashids.c hashids.c: In function 'hashids_encode': hashids.c:425:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] size_t i, j, result_len, guard_index, half_length_ceil, half_length_floor; ^~~~~~
Thanks @rkgrep. Will merge and release v1.2.1
Build fails on alpine linux due to ISO C90 standards: