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
1af7c4cb
Commit
1af7c4cb
authored
Aug 30, 2016
by
Sergio Campama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes static analyzer issues from xcode.
parent
4f379f81
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
4 deletions
+7
-4
parser.cc
src/google/protobuf/compiler/parser.cc
+1
-0
substitute.cc
src/google/protobuf/stubs/substitute.cc
+3
-1
default_value_objectwriter.cc
...ogle/protobuf/util/internal/default_value_objectwriter.cc
+0
-1
json_stream_parser.cc
src/google/protobuf/util/internal/json_stream_parser.cc
+0
-2
message_differencer.cc
src/google/protobuf/util/message_differencer.cc
+3
-0
No files found.
src/google/protobuf/compiler/parser.cc
View file @
1af7c4cb
...
...
@@ -570,6 +570,7 @@ bool Parser::Parse(io::Tokenizer* input, FileDescriptorProto* file) {
input_
=
NULL
;
source_code_info_
=
NULL
;
assert
(
file
!=
NULL
);
source_code_info
.
Swap
(
file
->
mutable_source_code_info
());
return
!
had_errors_
;
}
...
...
src/google/protobuf/stubs/substitute.cc
View file @
1af7c4cb
...
...
@@ -113,7 +113,9 @@ void SubstituteAndAppend(
for
(
int
i
=
0
;
format
[
i
]
!=
'\0'
;
i
++
)
{
if
(
format
[
i
]
==
'$'
)
{
if
(
ascii_isdigit
(
format
[
i
+
1
]))
{
const
SubstituteArg
*
src
=
args_array
[
format
[
i
+
1
]
-
'0'
];
unsigned
int
index
=
format
[
i
+
1
]
-
'0'
;
assert
(
index
<
10
);
const
SubstituteArg
*
src
=
args_array
[
index
];
memcpy
(
target
,
src
->
data
(),
src
->
size
());
target
+=
src
->
size
();
++
i
;
// Skip next char.
...
...
src/google/protobuf/util/internal/default_value_objectwriter.cc
View file @
1af7c4cb
...
...
@@ -586,7 +586,6 @@ void DefaultValueObjectWriter::RenderDataPiece(StringPiece name,
new
Node
(
name
.
ToString
(),
NULL
,
PRIMITIVE
,
data
,
false
,
child
==
NULL
?
current_
->
path
()
:
child
->
path
(),
suppress_empty_list_
,
field_scrub_callback_
.
get
()));
child
=
node
.
get
();
current_
->
AddChild
(
node
.
release
());
}
else
{
child
->
set_data
(
data
);
...
...
src/google/protobuf/util/internal/json_stream_parser.cc
View file @
1af7c4cb
...
...
@@ -315,7 +315,6 @@ util::Status JsonStreamParser::ParseStringHelper() {
// We're about to handle an escape, copy all bytes from last to data.
if
(
last
<
data
)
{
parsed_storage_
.
append
(
last
,
data
-
last
);
last
=
data
;
}
// If we ran out of string after the \, cancel or report an error
// depending on if we expect more data later.
...
...
@@ -371,7 +370,6 @@ util::Status JsonStreamParser::ParseStringHelper() {
}
else
{
if
(
last
<
data
)
{
parsed_storage_
.
append
(
last
,
data
-
last
);
last
=
data
;
}
parsed_
=
StringPiece
(
parsed_storage_
);
}
...
...
src/google/protobuf/util/message_differencer.cc
View file @
1af7c4cb
...
...
@@ -626,6 +626,7 @@ bool MessageDifferencer::CompareWithFieldsInternal(
}
if
(
reporter_
!=
NULL
)
{
assert
(
field1
!=
NULL
);
int
count
=
field1
->
is_repeated
()
?
reflection1
->
FieldSize
(
message1
,
field1
)
:
1
;
...
...
@@ -706,6 +707,7 @@ bool MessageDifferencer::CompareWithFieldsInternal(
}
bool
fieldDifferent
=
false
;
assert
(
field1
!=
NULL
);
if
(
field1
->
is_repeated
())
{
fieldDifferent
=
!
CompareRepeatedField
(
message1
,
message2
,
field1
,
parent_fields
);
...
...
@@ -875,6 +877,7 @@ bool MessageDifferencer::CompareRepeatedField(
for
(
int
i
=
0
;
i
<
count1
;
++
i
)
{
if
(
match_list1
[
i
]
!=
-
1
)
continue
;
assert
(
reporter_
!=
NULL
);
specific_field
.
index
=
i
;
parent_fields
->
push_back
(
specific_field
);
reporter_
->
ReportDeleted
(
message1
,
message2
,
*
parent_fields
);
...
...
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