From 9dfee3cc187181ae12b37f965d139b666b3a2948 Mon Sep 17 00:00:00 2001 From: "snappy.mirrorbot@gmail.com" Date: Wed, 4 Jan 2012 13:10:46 +0000 Subject: Fix public issue r57: Fix most warnings with -Wall, mostly signed/unsigned warnings. There are still some in the unit test, but the main .cc file should be clean. We haven't enabled -Wall for the default build, since the unit test is still not clean. This also fixes a real bug in the open-source implementation of ReadFileToStringOrDie(); it would not detect errors correctly. I had to go through some pains to avoid performance loss as the types were changed; I think there might still be some with 32-bit if and only if LFS is enabled (ie., size_t is 64-bit), but for regular 32-bit and 64-bit I can't see any losses, and I've diffed the generated GCC assembler between the old and new code without seeing any significant choices. If anything, it's ever so slightly faster. This may or may not enable compression of very large blocks (>2^32 bytes) when size_t is 64-bit, but I haven't checked, and it is still not a supported case. git-svn-id: http://snappy.googlecode.com/svn/trunk@56 03e5f5b5-db94-4691-08a0-1a8bf15f6143 --- snappy-stubs-internal.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'snappy-stubs-internal.h') diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h index 0215288..12ba1ab 100644 --- a/snappy-stubs-internal.h +++ b/snappy-stubs-internal.h @@ -86,10 +86,9 @@ using namespace std; // version (anyone who wants to regenerate it can just do the call // themselves within main()). #define DEFINE_bool(flag_name, default_value, description) \ - bool FLAGS_ ## flag_name = default_value; + bool FLAGS_ ## flag_name = default_value #define DECLARE_bool(flag_name) \ - extern bool FLAGS_ ## flag_name; -#define REGISTER_MODULE_INITIALIZER(name, code) + extern bool FLAGS_ ## flag_name namespace snappy { -- cgit v1.2.1