Commit c1ccc790 authored by lahiker42's avatar lahiker42

Suppress warnings that emerge with -Wcast-qual and -Wshadow

(thanks in part to Robert Edmonds for this patch).



git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@75 00440858-1255-0410-a3e6-75ea37f81c3a
parent dd9d5f3c
This diff is collapsed.
......@@ -207,21 +207,21 @@ GenerateHelperFunctionDefinitions(io::Printer* printer)
" (const $classname$ *message)\n"
"{\n"
" PROTOBUF_C_ASSERT (message->base.descriptor == &$lcclassname$__descriptor);\n"
" return protobuf_c_message_get_packed_size ((ProtobufCMessage*)(message));\n"
" return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));\n"
"}\n"
"size_t $lcclassname$__pack\n"
" (const $classname$ *message,\n"
" uint8_t *out)\n"
"{\n"
" PROTOBUF_C_ASSERT (message->base.descriptor == &$lcclassname$__descriptor);\n"
" return protobuf_c_message_pack ((ProtobufCMessage*)message, out);\n"
" return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);\n"
"}\n"
"size_t $lcclassname$__pack_to_buffer\n"
" (const $classname$ *message,\n"
" ProtobufCBuffer *buffer)\n"
"{\n"
" PROTOBUF_C_ASSERT (message->base.descriptor == &$lcclassname$__descriptor);\n"
" return protobuf_c_message_pack_to_buffer ((ProtobufCMessage*)message, buffer);\n"
" return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);\n"
"}\n"
"$classname$ *\n"
" $lcclassname$__unpack\n"
......
......@@ -25,7 +25,6 @@
#include <map>
#include <string>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/descriptor.h>
namespace google {
......
......@@ -53,7 +53,7 @@ TEST_ENUM_TYPE_NAME enum_random[] = {
T(0), T(2097152), T(268435455), T(127), T(16383), T(16384) };
#undef T
const char *repeated_strings_0[] = { "onestring" };
const char *repeated_strings_1[] = { "two", "string" };
const char *repeated_strings_2[] = { "many", "tiny", "little", "strings", "should", "be", "handled" };
const char *repeated_strings_3[] = { "one very long strings XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" };
char *repeated_strings_0[] = { "onestring" };
char *repeated_strings_1[] = { "two", "string" };
char *repeated_strings_2[] = { "many", "tiny", "little", "strings", "should", "be", "handled" };
char *repeated_strings_3[] = { "one very long strings XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment