From 68e19d426ba6d9f048ebfdf337b93a85dc4d5b4c Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 29 Jun 2014 18:18:50 +0200 Subject: Update lzo version --HG-- extra : rebase_source : 4310223035376c8ac1773fd03a43289aa96ce4f3 --- main/lzo/tests/align.c | 26 ++++---------------------- main/lzo/tests/chksum.c | 24 +++--------------------- main/lzo/tests/promote.c | 33 ++++++++++++--------------------- main/lzo/tests/sizes.c | 33 ++++++++++----------------------- 4 files changed, 29 insertions(+), 87 deletions(-) (limited to 'main/lzo/tests') diff --git a/main/lzo/tests/align.c b/main/lzo/tests/align.c index bc15663d..a4c5f7db 100644 --- a/main/lzo/tests/align.c +++ b/main/lzo/tests/align.c @@ -2,22 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -52,14 +37,14 @@ #include "examples/portab.h" -int opt_verbose = 0; +static int opt_verbose = 0; /************************************************************************* // **************************************************************************/ -unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step) +static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step) { lzo_bytep b1 = block; lzo_bytep b2 = block; @@ -208,7 +193,4 @@ int main(int argc, char *argv[]) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/tests/chksum.c b/main/lzo/tests/chksum.c index 7fbcb417..bb5b502b 100644 --- a/main/lzo/tests/chksum.c +++ b/main/lzo/tests/chksum.c @@ -2,22 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -56,7 +41,7 @@ int main(int argc, char *argv[]) { lzo_bytep block; lzo_uint block_len; - lzo_uint32 adler, crc; + lzo_uint32_t adler, crc; if (argc < 0 && argv == NULL) /* avoid warning about unused args */ return 0; @@ -101,7 +86,4 @@ int main(int argc, char *argv[]) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/tests/promote.c b/main/lzo/tests/promote.c index 21fff2c4..30c6da60 100644 --- a/main/lzo/tests/promote.c +++ b/main/lzo/tests/promote.c @@ -2,22 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -42,6 +27,11 @@ #include +#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) + /* disable "unreachable code" warnings */ +# pragma warning(disable: 4702) +#endif + int main(int argc, char *argv[]) { unsigned char c; @@ -54,10 +44,12 @@ int main(int argc, char *argv[]) s = 8 * (int) (sizeof(int) - sizeof(char)); printf("Integral promotion: "); - if ((c << s) > 0) + { + const int u = (c << s) > 0; + if (u) { printf("Classic C (unsigned-preserving)\n"); - printf("%d %d %uU\n", c, s, c << s); + printf("%d %d %uU\n", c, s, (unsigned)c << s); return 1; } else @@ -66,8 +58,7 @@ int main(int argc, char *argv[]) printf("%d %d %d\n", c, s, c << s); return 0; } + } } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/tests/sizes.c b/main/lzo/tests/sizes.c index aea8cc2e..3840fe2a 100644 --- a/main/lzo/tests/sizes.c +++ b/main/lzo/tests/sizes.c @@ -2,22 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -59,6 +44,11 @@ #include "lzo/lzoconf.h" #include +#if (LZO_CC_MSC && (_MSC_VER >= 1300)) + /* disable warning C4310: cast truncates constant value */ +# pragma warning(disable: 4310) +#endif + union _lzo_align1_t { @@ -101,15 +91,15 @@ union _lzo_align6_t #define print_size(type) \ sprintf(s,"sizeof(%s)",#type); \ - printf("%-30s %2d\n", s, (int)sizeof(type)); + printf("%-30s %2ld\n", s, (long)sizeof(type)); #define print_ssize(type,m) \ sprintf(s,"sizeof(%s)",#type); \ - printf("%-30s %2d %20ld\n", s, (int)sizeof(type), (long)(m)); + printf("%-30s %2ld %20ld\n", s, (long)sizeof(type), (long)(m)); #define print_usize(type,m) \ sprintf(s,"sizeof(%s)",#type); \ - printf("%-30s %2d %20lu\n", s, (int)sizeof(type), (unsigned long)(m)); + printf("%-30s %2ld %20lu\n", s, (long)sizeof(type), (unsigned long)(m)); int main(int argc, char *argv[]) @@ -130,7 +120,6 @@ int main(int argc, char *argv[]) printf("\n"); print_ssize(lzo_int,LZO_INT_MAX); print_usize(lzo_uint,LZO_UINT_MAX); - print_usize(lzo_uint32,LZO_UINT32_MAX); print_size(lzo_bytep); printf("\n"); print_size(union _lzo_align1_t); @@ -145,7 +134,5 @@ int main(int argc, char *argv[]) return 0; } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ -- cgit v1.2.3