From 0a22bf7d6eb0668e280b58e16e2820e90c773979 Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Tue, 8 Nov 2016 11:47:03 +0100 Subject: err0r(LZ4F_errorCodes code) uses ptrdiff_t --- .travis.yml | 4 +++- lib/lz4frame.c | 2 +- tests/Makefile | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd9bf31..71b8288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,8 @@ matrix: - qemu-system-arm - qemu-user-static - gcc-arm-linux-gnueabi - - libc6-dev-i386 + - libc6-dev-armel-cross + - linux-libc-dev-armel-cross - env: Ubu=14.04 Cmd='make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static' COMPILER=aarch64-linux-gnu-gcc dist: trusty @@ -47,6 +48,7 @@ matrix: - qemu-system-arm - qemu-user-static - gcc-aarch64-linux-gnu + - libc6-dev-arm64-cross - env: Ubu=14.04 Cmd='make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static && make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64' COMPILER=powerpc-linux-gnu-gcc dist: trusty diff --git a/lib/lz4frame.c b/lib/lz4frame.c index 08b7050..a946f29 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -195,7 +195,7 @@ const char* LZ4F_getErrorName(LZ4F_errorCode_t code) return codeError; } -static LZ4F_errorCode_t err0r(LZ4F_errorCodes code) { return (LZ4F_errorCode_t)-(LZ4F_errorCode_t)code; } +static LZ4F_errorCode_t err0r(LZ4F_errorCodes code) { return (LZ4F_errorCode_t)-(ptrdiff_t)code; } unsigned LZ4F_getVersion(void) { return LZ4F_VERSION; } diff --git a/tests/Makefile b/tests/Makefile index ecc395b..c46b04e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -255,7 +255,7 @@ test-platform: $(QEMU_SYS) ./datagen -g16KB | $(QEMU_SYS) $(PRGDIR)/lz4 -9 | $(QEMU_SYS) $(PRGDIR)/lz4 -t $(QEMU_SYS) ./datagen | $(QEMU_SYS) $(PRGDIR)/lz4 | $(QEMU_SYS) $(PRGDIR)/lz4 -t $(QEMU_SYS) ./datagen -g256MB | $(QEMU_SYS) $(PRGDIR)/lz4 -vqB4D | $(QEMU_SYS) $(PRGDIR)/lz4 -qt - $(QEMU_SYS) ./datagen -g6GB | $(QEMU_SYS) $(PRGDIR)/lz4 -vqB5D | $(QEMU_SYS) $(PRGDIR)/lz4 -qt + $(QEMU_SYS) ./datagen -g3GB | $(QEMU_SYS) $(PRGDIR)/lz4 -vqB5D | $(QEMU_SYS) $(PRGDIR)/lz4 -qt test-lz4c32: test-lz4c32-basic test-interop-32-64 -- cgit v0.12