Closed dur-randir closed 2 years ago
The following warnings are generated when building this module with gcc 9.1.0 on Debian:
gcc-9 -c -I./Encode -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -g -DVERSION=\"3.01\" -DXS_VERSION=\"3.01\" -fPIC "-I../.." def_t.c def_t.c:12:24: warning: uninitialized const ‘utf8_cp1252’ is invalid in C++ [-Wc++-compat] 12 | static const encpage_t utf8_cp1252[]; | ^~~ def_t.c:17:24: warning: uninitialized const ‘utf8_iso_8859_1’ is invalid in C++ [-Wc++-compat] 17 | static const encpage_t utf8_iso_8859_1[]; | ^~~~~~~ def_t.c:204:24: warning: duplicate declaration of ‘utf8_cp1252’ is invalid in C++ [-Wc++-compat] 204 | static const encpage_t utf8_cp1252[8] = { | ^~~ def_t.c:12:24: note: previous declaration of ‘utf8_cp1252’ was here 12 | static const encpage_t utf8_cp1252[]; | ^~~ def_t.c:242:24: warning: duplicate declaration of ‘utf8_iso_8859_1’ is invalid in C++ [-Wc++-compat] 242 | static const encpage_t utf8_iso_8859_1[4] = { | ^~~~~~~ def_t.c:17:24: note: previous declaration of ‘utf8_iso_8859_1’ was here 17 | static const encpage_t utf8_iso_8859_1[]; | ^~~~~~~
See also https://github.com/Perl/perl5/issues/19588. I will push a PR to fix this in a few minutes.
PR to fix this created as: https://github.com/dankogai/p5-encode/pull/168
Pulled. Closing. Thank you!
The following warnings are generated when building this module with gcc 9.1.0 on Debian:
gcc-9 -c -I./Encode -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -g -DVERSION=\"3.01\" -DXS_VERSION=\"3.01\" -fPIC "-I../.." def_t.c def_t.c:12:24: warning: uninitialized const ‘utf8_cp1252’ is invalid in C++ [-Wc++-compat] 12 | static const encpage_t utf8_cp1252[]; | ^
~~def_t.c:17:24: warning: uninitialized const ‘utf8_iso_8859_1’ is invalid in C++ [-Wc++-compat] 17 | static const encpage_t utf8_iso_8859_1[]; | ^~~~~~~ def_t.c:204:24: warning: duplicate declaration of ‘utf8_cp1252’ is invalid in C++ [-Wc++-compat] 204 | static const encpage_t utf8_cp1252[8] = { | ^~~def_t.c:12:24: note: previous declaration of ‘utf8_cp1252’ was here 12 | static const encpage_t utf8_cp1252[]; | ^~~def_t.c:242:24: warning: duplicate declaration of ‘utf8_iso_8859_1’ is invalid in C++ [-Wc++-compat] 242 | static const encpage_t utf8_iso_8859_1[4] = { | ^~~~~~~ def_t.c:17:24: note: previous declaration of ‘utf8_iso_8859_1’ was here 17 | static const encpage_t utf8_iso_8859_1[]; | ^~~~~~~