Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
protobuf-c
Commits
cc2506b9
Commit
cc2506b9
authored
Jun 19, 2014
by
Ilya Lipnitskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protobuf-c.c: Fix compiler warnings
parent
713a748e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
protobuf-c/protobuf-c.c
protobuf-c/protobuf-c.c
+8
-5
No files found.
protobuf-c/protobuf-c.c
View file @
cc2506b9
...
@@ -1590,8 +1590,8 @@ pack_buffer_packed_payload(const ProtobufCFieldDescriptor *field,
...
@@ -1590,8 +1590,8 @@ pack_buffer_packed_payload(const ProtobufCFieldDescriptor *field,
buffer
->
append
(
buffer
,
len
,
scratch
);
buffer
->
append
(
buffer
,
len
,
scratch
);
rv
+=
len
;
rv
+=
len
;
}
}
#endif
break
;
break
;
#endif
case
PROTOBUF_C_TYPE_SFIXED64
:
case
PROTOBUF_C_TYPE_SFIXED64
:
case
PROTOBUF_C_TYPE_FIXED64
:
case
PROTOBUF_C_TYPE_FIXED64
:
case
PROTOBUF_C_TYPE_DOUBLE
:
case
PROTOBUF_C_TYPE_DOUBLE
:
...
@@ -1985,7 +1985,7 @@ merge_messages(ProtobufCMessage *earlier_msg,
...
@@ -1985,7 +1985,7 @@ merge_messages(ProtobufCMessage *earlier_msg,
const
void
*
def_val
=
fields
[
i
].
default_value
;
const
void
*
def_val
=
fields
[
i
].
default_value
;
switch
(
fields
[
i
].
type
)
{
switch
(
fields
[
i
].
type
)
{
case
PROTOBUF_C_TYPE_BYTES
:
case
PROTOBUF_C_TYPE_BYTES
:
{
el_size
=
sizeof
(
ProtobufCBinaryData
);
el_size
=
sizeof
(
ProtobufCBinaryData
);
uint8_t
*
e_data
=
uint8_t
*
e_data
=
((
ProtobufCBinaryData
*
)
earlier_elem
)
->
data
;
((
ProtobufCBinaryData
*
)
earlier_elem
)
->
data
;
...
@@ -2002,7 +2002,8 @@ merge_messages(ProtobufCMessage *earlier_msg,
...
@@ -2002,7 +2002,8 @@ merge_messages(ProtobufCMessage *earlier_msg,
(
d_bd
!=
NULL
&&
(
d_bd
!=
NULL
&&
l_data
==
d_bd
->
data
));
l_data
==
d_bd
->
data
));
break
;
break
;
case
PROTOBUF_C_TYPE_STRING
:
}
case
PROTOBUF_C_TYPE_STRING
:
{
el_size
=
sizeof
(
char
*
);
el_size
=
sizeof
(
char
*
);
char
*
e_str
=
*
(
char
**
)
earlier_elem
;
char
*
e_str
=
*
(
char
**
)
earlier_elem
;
char
*
l_str
=
*
(
char
**
)
latter_elem
;
char
*
l_str
=
*
(
char
**
)
latter_elem
;
...
@@ -2010,7 +2011,8 @@ merge_messages(ProtobufCMessage *earlier_msg,
...
@@ -2010,7 +2011,8 @@ merge_messages(ProtobufCMessage *earlier_msg,
need_to_merge
=
e_str
!=
d_str
&&
l_str
==
d_str
;
need_to_merge
=
e_str
!=
d_str
&&
l_str
==
d_str
;
break
;
break
;
default:
}
default:
{
el_size
=
sizeof_elt_in_repeated_array
(
fields
[
i
].
type
);
el_size
=
sizeof_elt_in_repeated_array
(
fields
[
i
].
type
);
need_to_merge
=
need_to_merge
=
...
@@ -2022,6 +2024,7 @@ merge_messages(ProtobufCMessage *earlier_msg,
...
@@ -2022,6 +2024,7 @@ merge_messages(ProtobufCMessage *earlier_msg,
fields
[
i
].
quantifier_offset
);
fields
[
i
].
quantifier_offset
);
break
;
break
;
}
}
}
if
(
need_to_merge
)
{
if
(
need_to_merge
)
{
memcpy
(
latter_elem
,
earlier_elem
,
el_size
);
memcpy
(
latter_elem
,
earlier_elem
,
el_size
);
...
@@ -2414,8 +2417,8 @@ parse_packed_repeated_member(ScannedMember *scanned_member,
...
@@ -2414,8 +2417,8 @@ parse_packed_repeated_member(ScannedMember *scanned_member,
((
uint32_t
*
)
array
)[
i
]
=
parse_fixed_uint32
(
at
);
((
uint32_t
*
)
array
)[
i
]
=
parse_fixed_uint32
(
at
);
at
+=
4
;
at
+=
4
;
}
}
#endif
break
;
break
;
#endif
case
PROTOBUF_C_TYPE_SFIXED64
:
case
PROTOBUF_C_TYPE_SFIXED64
:
case
PROTOBUF_C_TYPE_FIXED64
:
case
PROTOBUF_C_TYPE_FIXED64
:
case
PROTOBUF_C_TYPE_DOUBLE
:
case
PROTOBUF_C_TYPE_DOUBLE
:
...
...
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