1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

liblzma: Avoid compiler warning without creating extra symbol.

When the generic fast crc64 method is used, then we omit
lzma_crc64_table[][]. Similar to
d9166b52cf, we can avoid compiler warnings
with -Wempty-translation-unit (Clang) or -pedantic (GCC) by creating a
never used typedef instead of an extra symbol.
This commit is contained in:
Jia Tan 2023-09-27 00:02:11 +08:00
parent 092d21db2e
commit 8ebaf3f665

View file

@ -20,8 +20,7 @@
|| (defined(__e2k__) && __iset__ >= 6) || (defined(__e2k__) && __iset__ >= 6)
// No table needed but something has to be exported to keep some toolchains // No table needed but something has to be exported to keep some toolchains
// happy. Also use a declaration to silence compiler warnings. // happy. Also use a declaration to silence compiler warnings.
extern const char lzma_crc64_dummy; typedef void lzma_crc64_dummy;
const char lzma_crc64_dummy;
#else #else
// Having the declaration here silences clang -Wmissing-variable-declarations. // Having the declaration here silences clang -Wmissing-variable-declarations.