1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

encoding: Suppress -Wcast-align warnings

This commit is contained in:
Nick Wellnhofer 2023-10-02 15:04:18 +02:00
parent 71aae4e98b
commit 1734d27dca
2 changed files with 6 additions and 8 deletions

View File

@ -55,7 +55,7 @@ clang:asan:
variables: variables:
CONFIG: "--without-python" CONFIG: "--without-python"
CC: clang CC: clang
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,integer -fno-sanitize-recover=all -Wno-error=cast-align" CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,integer -fno-sanitize-recover=all"
UBSAN_OPTIONS: "print_stacktrace=1" UBSAN_OPTIONS: "print_stacktrace=1"
ASAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer" ASAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer"
@ -66,7 +66,7 @@ clang:msan:
variables: variables:
CONFIG: "--without-python --without-zlib --without-lzma" CONFIG: "--without-python --without-zlib --without-lzma"
CC: clang CC: clang
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=memory -Wno-error=cast-align" CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=memory"
MSAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer" MSAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer"
.mingw: .mingw:
@ -142,7 +142,6 @@ cmake:linux:clang:shared:
variables: variables:
BUILD_SHARED_LIBS: "ON" BUILD_SHARED_LIBS: "ON"
CC: clang CC: clang
CFLAGS: "-Wno-error=cast-align"
SUFFIX: linux-clang-shared SUFFIX: linux-clang-shared
cmake:linux:clang:static: cmake:linux:clang:static:
@ -152,7 +151,6 @@ cmake:linux:clang:static:
variables: variables:
BUILD_SHARED_LIBS: "OFF" BUILD_SHARED_LIBS: "OFF"
CC: clang CC: clang
CFLAGS: "-Wno-error=cast-align"
SUFFIX: linux-clang-static SUFFIX: linux-clang-static
.cmake:mingw: .cmake:mingw:

View File

@ -480,7 +480,7 @@ UTF16LEToUTF8(unsigned char* out, int *outlen,
unsigned char* outstart = out; unsigned char* outstart = out;
const unsigned char* processed = inb; const unsigned char* processed = inb;
unsigned char* outend; unsigned char* outend;
unsigned short* in = (unsigned short*) inb; unsigned short* in = (unsigned short *) (void *) inb;
unsigned short* inend; unsigned short* inend;
unsigned int c, d, inlen; unsigned int c, d, inlen;
unsigned char *tmp; unsigned char *tmp;
@ -566,7 +566,7 @@ static int
UTF8ToUTF16LE(unsigned char* outb, int *outlen, UTF8ToUTF16LE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen) const unsigned char* in, int *inlen)
{ {
unsigned short* out = (unsigned short*) outb; unsigned short* out = (unsigned short *) (void *) outb;
const unsigned char* processed = in; const unsigned char* processed = in;
const unsigned char *const instart = in; const unsigned char *const instart = in;
unsigned short* outstart= out; unsigned short* outstart= out;
@ -718,7 +718,7 @@ UTF16BEToUTF8(unsigned char* out, int *outlen,
unsigned char* outstart = out; unsigned char* outstart = out;
const unsigned char* processed = inb; const unsigned char* processed = inb;
unsigned char* outend; unsigned char* outend;
unsigned short* in = (unsigned short*) inb; unsigned short* in = (unsigned short *) (void *) inb;
unsigned short* inend; unsigned short* inend;
unsigned int c, d, inlen; unsigned int c, d, inlen;
unsigned char *tmp; unsigned char *tmp;
@ -804,7 +804,7 @@ static int
UTF8ToUTF16BE(unsigned char* outb, int *outlen, UTF8ToUTF16BE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen) const unsigned char* in, int *inlen)
{ {
unsigned short* out = (unsigned short*) outb; unsigned short* out = (unsigned short *) (void *) outb;
const unsigned char* processed = in; const unsigned char* processed = in;
const unsigned char *const instart = in; const unsigned char *const instart = in;
unsigned short* outstart= out; unsigned short* outstart= out;