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
c40ab0ff
Commit
c40ab0ff
authored
Apr 12, 2019
by
Keith Smiley
Committed by
Adam Cozzette
Apr 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more warnings
These were found attempting to enable -Werror
parent
c1f650a3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
16 deletions
+19
-16
arena_unittest.cc
src/google/protobuf/arena_unittest.cc
+3
-0
cpp_bootstrap_unittest.cc
src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
+0
-1
parser_unittest.cc
src/google/protobuf/compiler/parser_unittest.cc
+1
-1
map_field_test.cc
src/google/protobuf/map_field_test.cc
+12
-12
googletest.cc
src/google/protobuf/testing/googletest.cc
+3
-0
json_util_test.cc
src/google/protobuf/util/json_util_test.cc
+0
-2
No files found.
src/google/protobuf/arena_unittest.cc
View file @
c40ab0ff
...
...
@@ -1345,7 +1345,10 @@ TEST(ArenaTest, GetArenaShouldReturnNullForNonArenaCompatibleTypes) {
// Test that GetArena returns nullptr for types that have a GetArena alias.
struct
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedef"
using
GetArena
=
Arena
*
;
#pragma GCC diagnostic pop
}
has_get_arena_alias
;
EXPECT_EQ
(
nullptr
,
Arena
::
GetArena
(
&
has_get_arena_alias
));
...
...
src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
View file @
c40ab0ff
...
...
@@ -131,7 +131,6 @@ class MockGeneratorContext : public GeneratorContext {
const
char
kDescriptorParameter
[]
=
"dllexport_decl=PROTOBUF_EXPORT"
;
const
char
kPluginParameter
[]
=
"dllexport_decl=PROTOC_EXPORT"
;
const
char
kNormalParameter
[]
=
""
;
const
char
*
test_protos
[][
2
]
=
{
{
"google/protobuf/descriptor"
,
kDescriptorParameter
},
...
...
src/google/protobuf/compiler/parser_unittest.cc
View file @
c40ab0ff
...
...
@@ -68,7 +68,7 @@ class MockErrorCollector : public io::ErrorCollector {
std
::
string
text_
;
// implements ErrorCollector ---------------------------------------
void
AddError
(
int
line
,
int
column
,
const
std
::
string
&
message
)
{
void
AddError
(
int
line
,
int
column
,
const
std
::
string
&
message
)
override
{
strings
::
SubstituteAndAppend
(
&
text_
,
"$0:$1: $2
\n
"
,
line
,
column
,
message
);
}
};
...
...
src/google/protobuf/map_field_test.cc
View file @
c40ab0ff
...
...
@@ -78,25 +78,25 @@ class MapFieldBaseStub : public MapFieldBase {
void
SetRepeatedDirty
()
{
state_
.
store
(
STATE_MODIFIED_REPEATED
,
std
::
memory_order_relaxed
);
}
bool
ContainsMapKey
(
const
MapKey
&
map_key
)
const
{
return
false
;
}
bool
InsertOrLookupMapValue
(
const
MapKey
&
map_key
,
MapValueRef
*
val
)
{
bool
ContainsMapKey
(
const
MapKey
&
map_key
)
const
override
{
return
false
;
}
bool
InsertOrLookupMapValue
(
const
MapKey
&
map_key
,
MapValueRef
*
val
)
override
{
return
false
;
}
bool
DeleteMapValue
(
const
MapKey
&
map_key
)
{
return
false
;
}
bool
EqualIterator
(
const
MapIterator
&
a
,
const
MapIterator
&
b
)
const
{
bool
DeleteMapValue
(
const
MapKey
&
map_key
)
override
{
return
false
;
}
bool
EqualIterator
(
const
MapIterator
&
a
,
const
MapIterator
&
b
)
const
override
{
return
false
;
}
int
size
()
const
{
return
0
;
}
int
size
()
const
override
{
return
0
;
}
void
Clear
()
override
{}
void
MapBegin
(
MapIterator
*
map_iter
)
const
{}
void
MapEnd
(
MapIterator
*
map_iter
)
const
{}
void
MapBegin
(
MapIterator
*
map_iter
)
const
override
{}
void
MapEnd
(
MapIterator
*
map_iter
)
const
override
{}
void
MergeFrom
(
const
MapFieldBase
&
other
)
override
{}
void
Swap
(
MapFieldBase
*
other
)
{}
void
InitializeIterator
(
MapIterator
*
map_iter
)
const
{}
void
DeleteIterator
(
MapIterator
*
map_iter
)
const
{}
void
Swap
(
MapFieldBase
*
other
)
override
{}
void
InitializeIterator
(
MapIterator
*
map_iter
)
const
override
{}
void
DeleteIterator
(
MapIterator
*
map_iter
)
const
override
{}
void
CopyIterator
(
MapIterator
*
this_iterator
,
const
MapIterator
&
other_iterator
)
const
{}
void
IncreaseIterator
(
MapIterator
*
map_iter
)
const
{}
const
MapIterator
&
other_iterator
)
const
override
{}
void
IncreaseIterator
(
MapIterator
*
map_iter
)
const
override
{}
void
SetDefaultMessageEntry
(
const
Message
*
message
)
const
{}
const
Message
*
GetDefaultMessageEntry
()
const
{
return
NULL
;
}
};
...
...
src/google/protobuf/testing/googletest.cc
View file @
c40ab0ff
...
...
@@ -119,7 +119,10 @@ string GetTemporaryDirectoryName() {
// testing. We cannot use tmpfile() or mkstemp() since we're creating a
// directory.
char
b
[
L_tmpnam
+
1
];
// HPUX multithread return 0 if s is 0
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
string
result
=
tmpnam
(
b
);
#pragma GCC diagnostic pop
#ifdef _WIN32
// Avoid a trailing dot by changing it to an underscore. On Win32 the names of
// files and directories can, but should not, end with dot.
...
...
src/google/protobuf/util/json_util_test.cc
View file @
c40ab0ff
...
...
@@ -58,8 +58,6 @@ using proto3::TestMessage;
using
proto3
::
TestOneof
;
using
proto_util_converter
::
testing
::
MapIn
;
static
const
char
kTypeUrlPrefix
[]
=
"type.googleapis.com"
;
// As functions defined in json_util.h are just thin wrappers around the
// JSON conversion code in //net/proto2/util/converter, in this test we
// only cover some very basic cases to make sure the wrappers have forwarded
...
...
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