From 613b3675969f877b26e66e3e5fee2921213d09f8 Mon Sep 17 00:00:00 2001 From: Andrei Nigmatulin Date: Thu, 13 Dec 2012 15:24:18 +0000 Subject: [PATCH] fixed gcc warnings 'integer constant is so large that it is unsigned' for large 64 bit constants (default values) --- protoc-c/c_primitive_field.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc index 0d7a46d..f977bea 100644 --- a/protoc-c/c_primitive_field.cc +++ b/protoc-c/c_primitive_field.cc @@ -130,11 +130,11 @@ string PrimitiveFieldGenerator::GetDefaultValue() const case FieldDescriptor::CPPTYPE_INT32: return SimpleItoa(descriptor_->default_value_int32()); case FieldDescriptor::CPPTYPE_INT64: - return SimpleItoa(descriptor_->default_value_int64()); + return SimpleItoa(descriptor_->default_value_int64()) + "ll"; case FieldDescriptor::CPPTYPE_UINT32: - return SimpleItoa(descriptor_->default_value_uint32()); + return SimpleItoa(descriptor_->default_value_uint32()) + "u"; case FieldDescriptor::CPPTYPE_UINT64: - return SimpleItoa(descriptor_->default_value_uint64()); + return SimpleItoa(descriptor_->default_value_uint64()) + "ull"; case FieldDescriptor::CPPTYPE_FLOAT: return SimpleFtoa(descriptor_->default_value_float()); case FieldDescriptor::CPPTYPE_DOUBLE: