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
a4516819
Commit
a4516819
authored
Dec 02, 2014
by
Feng Xiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #116 from xfxyjwf/fix_warnings
Get rid of some build warnings.
parents
e45149b4
9173ba22
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
9 deletions
+13
-9
configure.ac
configure.ac
+1
-0
arena.cc
src/google/protobuf/arena.cc
+3
-3
descriptor.cc
src/google/protobuf/descriptor.cc
+2
-0
extension_set.cc
src/google/protobuf/extension_set.cc
+2
-0
generated_message_reflection.cc
src/google/protobuf/generated_message_reflection.cc
+2
-2
common.h
src/google/protobuf/stubs/common.h
+3
-2
map_util.h
src/google/protobuf/stubs/map_util.h
+0
-2
No files found.
configure.ac
View file @
a4516819
...
...
@@ -54,6 +54,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_LANG([C++])
ACX_USE_SYSTEM_EXTENSIONS
AM_PROG_AR
AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
# test_util.cc takes forever to compile with GCC and optimization turned on.
...
...
src/google/protobuf/arena.cc
View file @
a4516819
...
...
@@ -46,10 +46,10 @@ void Arena::Init(const ArenaOptions& options) {
max_block_size_
=
options
.
max_block_size
;
block_alloc
=
options
.
block_alloc
;
block_dealloc
=
options
.
block_dealloc
;
blocks_
=
NULL
;
hint_
=
NULL
;
blocks_
=
0
;
hint_
=
0
;
owns_first_block_
=
true
;
cleanup_list_
=
NULL
;
cleanup_list_
=
0
;
if
(
options
.
initial_block
!=
NULL
&&
options
.
initial_block_size
>
0
)
{
// Add first unowned block to list.
...
...
src/google/protobuf/descriptor.cc
View file @
a4516819
...
...
@@ -144,6 +144,8 @@ const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) {
case
SYNTAX_UNKNOWN
:
return
"unknown"
;
}
GOOGLE_LOG
(
FATAL
)
<<
"can't reach here."
;
return
NULL
;
}
static
const
char
*
const
kNonLinkedWeakMessageReplacementName
=
"google.protobuf.Empty"
;
...
...
src/google/protobuf/extension_set.cc
View file @
a4516819
...
...
@@ -71,6 +71,8 @@ inline bool is_packable(WireFormatLite::WireType type) {
// Do not add a default statement. Let the compiler complain when someone
// adds a new wire type.
}
GOOGLE_LOG
(
FATAL
)
<<
"can't reach here."
;
return
false
;
}
// Registry stuff.
...
...
src/google/protobuf/generated_message_reflection.cc
View file @
a4516819
...
...
@@ -487,11 +487,11 @@ void GeneratedMessageReflection::SwapOneofField(
double
temp_double
;
bool
temp_bool
;
int
temp_int
;
Message
*
temp_message
;
Message
*
temp_message
=
NULL
;
string
temp_string
;
// Stores message1's oneof field to a temp variable.
const
FieldDescriptor
*
field1
;
const
FieldDescriptor
*
field1
=
NULL
;
if
(
oneof_case1
>
0
)
{
field1
=
descriptor_
->
FindFieldByNumber
(
oneof_case1
);
//oneof_descriptor->field(oneof_case1);
...
...
src/google/protobuf/stubs/common.h
View file @
a4516819
...
...
@@ -381,8 +381,9 @@ struct CompileAssert {
#undef GOOGLE_COMPILE_ASSERT
#define GOOGLE_COMPILE_ASSERT(expr, msg) \
typedef ::google::protobuf::internal::CompileAssert<(bool(expr))> \
msg[bool(expr) ? 1 : -1]
::google::protobuf::internal::CompileAssert<(bool(expr))> \
msg[bool(expr) ? 1 : -1]; \
(void)msg
// Implementation details of COMPILE_ASSERT:
...
...
src/google/protobuf/stubs/map_util.h
View file @
a4516819
...
...
@@ -353,7 +353,6 @@ template <class Collection>
void
InsertOrDie
(
Collection
*
const
collection
,
const
typename
Collection
::
value_type
::
first_type
&
key
,
const
typename
Collection
::
value_type
::
second_type
&
data
)
{
typedef
typename
Collection
::
value_type
value_type
;
GOOGLE_CHECK
(
InsertIfNotPresent
(
collection
,
key
,
data
))
<<
"duplicate key: "
<<
key
;
}
...
...
@@ -364,7 +363,6 @@ void InsertOrDieNoPrint(
Collection
*
const
collection
,
const
typename
Collection
::
value_type
::
first_type
&
key
,
const
typename
Collection
::
value_type
::
second_type
&
data
)
{
typedef
typename
Collection
::
value_type
value_type
;
GOOGLE_CHECK
(
InsertIfNotPresent
(
collection
,
key
,
data
))
<<
"duplicate key."
;
}
...
...
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