summaryrefslogtreecommitdiff
path: root/main/lzo/tests/promote.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-29 18:18:50 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-29 18:18:50 +0200
commit68e19d426ba6d9f048ebfdf337b93a85dc4d5b4c (patch)
treecb33b2698e3f665546a328882c7481b11f633428 /main/lzo/tests/promote.c
parentd3aa9f835d7fd5f53d3a0da6778d46a7067bf074 (diff)
Update lzo version
--HG-- extra : rebase_source : 4310223035376c8ac1773fd03a43289aa96ce4f3
Diffstat (limited to 'main/lzo/tests/promote.c')
-rw-r--r--main/lzo/tests/promote.c33
1 files changed, 12 insertions, 21 deletions
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 <stdio.h>
+#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: */