From f2a732938eddd212804db8c87f608cc11325b042 Mon Sep 17 00:00:00 2001 From: "kenton@google.com" Date: Mon, 21 Dec 2009 19:44:57 +0000 Subject: Fix build on GCC 3.3/Linux. --- src/google/protobuf/extension_set.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/google/protobuf/extension_set.cc') diff --git a/src/google/protobuf/extension_set.cc b/src/google/protobuf/extension_set.cc index b08b4b14..dfecf9ea 100644 --- a/src/google/protobuf/extension_set.cc +++ b/src/google/protobuf/extension_set.cc @@ -127,7 +127,9 @@ static bool CallNoArgValidityFunc(const void* arg, int number) { // relied on these kinds of casts for a long time, despite being // technically undefined. See: // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#195 - return ((const EnumValidityFunc*)arg)(number); + // Also note: Some compilers do not allow function pointers to be "const". + // Which makes sense, I suppose, because it's meaningless. + return ((EnumValidityFunc*)arg)(number); } void ExtensionSet::RegisterEnumExtension(const MessageLite* containing_type, -- cgit v1.2.3