Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
c5553a3d
Commit
c5553a3d
authored
May 28, 2014
by
liujisi@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Down-integrate pending changes from internal repository after previous release.
parent
e7f29379
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
25 deletions
+32
-25
descriptor.cc
src/google/protobuf/descriptor.cc
+12
-8
descriptor_database.h
src/google/protobuf/descriptor_database.h
+2
-2
extension_set.h
src/google/protobuf/extension_set.h
+1
-1
generated_message_reflection.cc
src/google/protobuf/generated_message_reflection.cc
+2
-2
tokenizer.h
src/google/protobuf/io/tokenizer.h
+2
-1
message.cc
src/google/protobuf/message.cc
+3
-2
atomicops.h
src/google/protobuf/stubs/atomicops.h
+2
-2
common.cc
src/google/protobuf/stubs/common.cc
+2
-2
common.h
src/google/protobuf/stubs/common.h
+2
-1
text_format.cc
src/google/protobuf/text_format.cc
+3
-3
wire_format_lite.cc
src/google/protobuf/wire_format_lite.cc
+1
-1
No files found.
src/google/protobuf/descriptor.cc
View file @
c5553a3d
...
...
@@ -811,7 +811,7 @@ string* DescriptorPool::Tables::AllocateString(const string& value) {
}
template
<
typename
Type
>
Type
*
DescriptorPool
::
Tables
::
AllocateMessage
(
Type
*
dummy
)
{
Type
*
DescriptorPool
::
Tables
::
AllocateMessage
(
Type
*
/* dummy */
)
{
Type
*
result
=
new
Type
;
messages_
.
push_back
(
result
);
return
result
;
...
...
@@ -3677,7 +3677,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto,
}
void
DescriptorBuilder
::
BuildService
(
const
ServiceDescriptorProto
&
proto
,
const
void
*
dummy
,
const
void
*
/* dummy */
,
ServiceDescriptor
*
result
)
{
string
*
full_name
=
tables_
->
AllocateString
(
file_
->
package
());
if
(
!
full_name
->
empty
())
full_name
->
append
(
1
,
'.'
);
...
...
@@ -3957,7 +3957,8 @@ void DescriptorBuilder::CrossLinkEnum(
}
void
DescriptorBuilder
::
CrossLinkEnumValue
(
EnumValueDescriptor
*
enum_value
,
const
EnumValueDescriptorProto
&
proto
)
{
EnumValueDescriptor
*
enum_value
,
const
EnumValueDescriptorProto
&
/* proto */
)
{
if
(
enum_value
->
options_
==
NULL
)
{
enum_value
->
options_
=
&
EnumValueOptions
::
default_instance
();
}
...
...
@@ -4158,7 +4159,8 @@ void DescriptorBuilder::ValidateEnumOptions(EnumDescriptor* enm,
}
void
DescriptorBuilder
::
ValidateEnumValueOptions
(
EnumValueDescriptor
*
enum_value
,
const
EnumValueDescriptorProto
&
proto
)
{
EnumValueDescriptor
*
/* enum_value */
,
const
EnumValueDescriptorProto
&
/* proto */
)
{
// Nothing to do so far.
}
void
DescriptorBuilder
::
ValidateServiceOptions
(
ServiceDescriptor
*
service
,
...
...
@@ -4176,8 +4178,8 @@ void DescriptorBuilder::ValidateServiceOptions(ServiceDescriptor* service,
VALIDATE_OPTIONS_FROM_ARRAY
(
service
,
method
,
Method
);
}
void
DescriptorBuilder
::
ValidateMethodOptions
(
MethodDescriptor
*
method
,
const
MethodDescriptorProto
&
proto
)
{
void
DescriptorBuilder
::
ValidateMethodOptions
(
MethodDescriptor
*
/* method */
,
const
MethodDescriptorProto
&
/* proto */
)
{
// Nothing to do so far.
}
...
...
@@ -4805,14 +4807,16 @@ class AggregateErrorCollector : public io::ErrorCollector {
public
:
string
error_
;
virtual
void
AddError
(
int
line
,
int
column
,
const
string
&
message
)
{
virtual
void
AddError
(
int
/* line */
,
int
/* column */
,
const
string
&
message
)
{
if
(
!
error_
.
empty
())
{
error_
+=
"; "
;
}
error_
+=
message
;
}
virtual
void
AddWarning
(
int
line
,
int
column
,
const
string
&
message
)
{
virtual
void
AddWarning
(
int
/* line */
,
int
/* column */
,
const
string
&
/* message */
)
{
// Ignore warnings
}
};
...
...
src/google/protobuf/descriptor_database.h
View file @
c5553a3d
...
...
@@ -96,8 +96,8 @@ class LIBPROTOBUF_EXPORT DescriptorDatabase {
//
// This method has a default implementation that always returns
// false.
virtual
bool
FindAllExtensionNumbers
(
const
string
&
extendee_type
,
vector
<
int
>*
output
)
{
virtual
bool
FindAllExtensionNumbers
(
const
string
&
/* extendee_type */
,
vector
<
int
>*
/* output */
)
{
return
false
;
}
...
...
src/google/protobuf/extension_set.h
View file @
c5553a3d
...
...
@@ -794,7 +794,7 @@ class MessageTypeTraits {
MutableType
message
,
ExtensionSet
*
set
)
{
set
->
SetAllocatedMessage
(
number
,
field_type
,
NULL
,
message
);
}
static
inline
MutableType
Release
(
int
number
,
FieldType
field_type
,
static
inline
MutableType
Release
(
int
number
,
FieldType
/* field_type */
,
ExtensionSet
*
set
)
{
return
static_cast
<
Type
*>
(
set
->
ReleaseMessage
(
number
,
Type
::
default_instance
()));
...
...
src/google/protobuf/generated_message_reflection.cc
View file @
c5553a3d
...
...
@@ -777,7 +777,7 @@ string GeneratedMessageReflection::GetString(
const
string
&
GeneratedMessageReflection
::
GetStringReference
(
const
Message
&
message
,
const
FieldDescriptor
*
field
,
string
*
scratch
)
const
{
const
FieldDescriptor
*
field
,
string
*
/* scratch */
)
const
{
USAGE_CHECK_ALL
(
GetStringReference
,
SINGULAR
,
STRING
);
if
(
field
->
is_extension
())
{
return
GetExtensionSet
(
message
).
GetString
(
field
->
number
(),
...
...
@@ -838,7 +838,7 @@ string GeneratedMessageReflection::GetRepeatedString(
const
string
&
GeneratedMessageReflection
::
GetRepeatedStringReference
(
const
Message
&
message
,
const
FieldDescriptor
*
field
,
int
index
,
string
*
scratch
)
const
{
int
index
,
string
*
/* scratch */
)
const
{
USAGE_CHECK_ALL
(
GetRepeatedStringReference
,
REPEATED
,
STRING
);
if
(
field
->
is_extension
())
{
return
GetExtensionSet
(
message
).
GetRepeatedString
(
field
->
number
(),
index
);
...
...
src/google/protobuf/io/tokenizer.h
View file @
c5553a3d
...
...
@@ -67,7 +67,8 @@ class LIBPROTOBUF_EXPORT ErrorCollector {
// Indicates that there was a warning in the input at the given line and
// column numbers. The numbers are zero-based, so you may want to add
// 1 to each before printing them.
virtual
void
AddWarning
(
int
line
,
int
column
,
const
string
&
message
)
{
}
virtual
void
AddWarning
(
int
/* line */
,
int
/* column */
,
const
string
&
/* message */
)
{
}
private
:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
(
ErrorCollector
);
...
...
src/google/protobuf/message.cc
View file @
c5553a3d
...
...
@@ -149,7 +149,7 @@ int Message::ByteSize() const {
return
size
;
}
void
Message
::
SetCachedSize
(
int
size
)
const
{
void
Message
::
SetCachedSize
(
int
/* size */
)
const
{
GOOGLE_LOG
(
FATAL
)
<<
"Message class
\"
"
<<
GetDescriptor
()
->
full_name
()
<<
"
\"
implements neither SetCachedSize() nor ByteSize(). "
"Must implement one or the other."
;
...
...
@@ -216,7 +216,8 @@ HANDLE_TYPE(bool, FieldDescriptor::CPPTYPE_BOOL, -1);
#undef HANDLE_TYPE
void
*
Reflection
::
MutableRawRepeatedString
(
Message
*
message
,
const
FieldDescriptor
*
field
,
bool
is_string
)
const
{
Message
*
message
,
const
FieldDescriptor
*
field
,
bool
/* is_string */
)
const
{
return
MutableRawRepeatedField
(
message
,
field
,
FieldDescriptor
::
CPPTYPE_STRING
,
FieldOptions
::
STRING
,
NULL
);
}
...
...
src/google/protobuf/stubs/atomicops.h
View file @
c5553a3d
...
...
@@ -179,7 +179,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#elif defined(__GNUC__)
#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
#include <google/protobuf/stubs/atomicops_internals_x86_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_ARM)
#elif defined(GOOGLE_PROTOBUF_ARCH_ARM)
&& defined(__linux__)
#include <google/protobuf/stubs/atomicops_internals_arm_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_AARCH64)
#include <google/protobuf/stubs/atomicops_internals_arm64_gcc.h>
...
...
@@ -187,7 +187,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#include <google/protobuf/stubs/atomicops_internals_arm_qnx.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_MIPS)
#include <google/protobuf/stubs/atomicops_internals_mips_gcc.h>
#elif defined(__
pnacl
__)
#elif defined(__
native_client
__)
#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
#else
GOOGLE_PROTOBUF_ATOMICOPS_ERROR
...
...
src/google/protobuf/stubs/common.cc
View file @
c5553a3d
...
...
@@ -115,8 +115,8 @@ void DefaultLogHandler(LogLevel level, const char* filename, int line,
fflush
(
stderr
);
// Needed on MSVC.
}
void
NullLogHandler
(
LogLevel
level
,
const
char
*
filename
,
int
line
,
const
string
&
message
)
{
void
NullLogHandler
(
LogLevel
/* level */
,
const
char
*
/* filename */
,
int
/* line */
,
const
string
&
/* message */
)
{
// Nothing.
}
...
...
src/google/protobuf/stubs/common.h
View file @
c5553a3d
...
...
@@ -720,7 +720,8 @@ class LIBPROTOBUF_EXPORT LogFinisher {
namespace
internal
{
template
<
typename
T
>
T
*
CheckNotNull
(
const
char
*
file
,
int
line
,
const
char
*
name
,
T
*
val
)
{
T
*
CheckNotNull
(
const
char
*
/* file */
,
int
/* line */
,
const
char
*
name
,
T
*
val
)
{
if
(
val
==
NULL
)
{
GOOGLE_LOG
(
FATAL
)
<<
name
;
}
...
...
src/google/protobuf/text_format.cc
View file @
c5553a3d
...
...
@@ -1075,7 +1075,7 @@ bool TextFormat::Parser::MergeFromString(const string& input,
return
Merge
(
&
input_stream
,
output
);
}
bool
TextFormat
::
Parser
::
MergeUsingImpl
(
io
::
ZeroCopyInputStream
*
input
,
bool
TextFormat
::
Parser
::
MergeUsingImpl
(
io
::
ZeroCopyInputStream
*
/* input */
,
Message
*
output
,
ParserImpl
*
parser_impl
)
{
if
(
!
parser_impl
->
Parse
(
output
))
return
false
;
...
...
@@ -1280,8 +1280,8 @@ void TextFormat::Printer::PrintShortRepeatedField(
}
}
void
TextFormat
::
Printer
::
PrintFieldName
(
const
Message
&
message
,
const
Reflection
*
reflection
,
void
TextFormat
::
Printer
::
PrintFieldName
(
const
Message
&
/* message */
,
const
Reflection
*
/* reflection */
,
const
FieldDescriptor
*
field
,
TextGenerator
&
generator
)
const
{
if
(
field
->
is_extension
())
{
...
...
src/google/protobuf/wire_format_lite.cc
View file @
c5553a3d
...
...
@@ -182,7 +182,7 @@ bool FieldSkipper::SkipMessage(io::CodedInputStream* input) {
}
void
FieldSkipper
::
SkipUnknownEnum
(
int
field_number
,
int
value
)
{
int
/* field_number */
,
int
/* value */
)
{
// Nothing.
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment