summaryrefslogtreecommitdiffstats
path: root/programs/lz4cli.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-11-30 12:54:04 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-11-30 12:54:04 (GMT)
commitdee47d11be17aec91a16a6381ea321b4d79f4200 (patch)
treee478b0dde6dc6f5d301078b6051c0c87e05a4046 /programs/lz4cli.c
parent73554386ed8c9b08940411c0e62bbdca3216f8cd (diff)
parentd0a6cccf75e147301b430a43bc9e591fdd80fce9 (diff)
downloadlz4-dee47d11be17aec91a16a6381ea321b4d79f4200.zip
lz4-dee47d11be17aec91a16a6381ea321b4d79f4200.tar.gz
lz4-dee47d11be17aec91a16a6381ea321b4d79f4200.tar.bz2
Merge pull request #36 from Cyan4973/AlignEndian
Align endian
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r--programs/lz4cli.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 2d612e7..6e52ec6 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -48,10 +48,6 @@
# pragma warning(disable : 4127) // disable: C4127: conditional expression is constant
#endif
-#ifdef __clang__
-# pragma clang diagnostic ignored "-Wunused-const-variable" // const variable one is really used !
-#endif
-
#define _FILE_OFFSET_BITS 64 // Large file support on 32-bits unix
#define _POSIX_SOURCE 1 // for fileno() within <stdio.h> on unix
@@ -113,7 +109,7 @@
//****************************
#define COMPRESSOR_NAME "LZ4 Compression CLI"
#ifndef LZ4_VERSION
-# define LZ4_VERSION "r122"
+# define LZ4_VERSION "r125"
#endif
#define AUTHOR "Yann Collet"
#define WELCOME_MESSAGE "*** %s %i-bits %s, by %s (%s) ***\n", COMPRESSOR_NAME, (int)(sizeof(void*)*8), LZ4_VERSION, AUTHOR, __DATE__
@@ -128,15 +124,6 @@
//**************************************
-// Architecture Macros
-//**************************************
-static const int one = 1;
-#define CPU_LITTLE_ENDIAN (*(char*)(&one))
-#define CPU_BIG_ENDIAN (!CPU_LITTLE_ENDIAN)
-#define LITTLE_ENDIAN_32(i) (CPU_LITTLE_ENDIAN?(i):swap32(i))
-
-
-//**************************************
// Macros
//**************************************
#define DISPLAY(...) fprintf(stderr, __VA_ARGS__)
@@ -462,7 +449,7 @@ int main(int argc, char** argv)
}
DISPLAYLEVEL(3, WELCOME_MESSAGE);
- DISPLAYLEVEL(4, "Blocks size : %i KB\n", blockSize>>10);
+ if (!decode) DISPLAYLEVEL(4, "Blocks size : %i KB\n", blockSize>>10);
// No input filename ==> use stdin
if(!input_filename) { input_filename=stdinmark; }