Commit e3ebf0c7 authored by Jan-Gerd Tenberge's avatar Jan-Gerd Tenberge Committed by Adam Cozzette

Add explicit cast to silence clang warning

Clang currently displays an error if source files generated with protoc are compiled with -Wcomma. This change fixes this as suggested by the compiler itself.
parent 065fa2f3
......@@ -918,8 +918,8 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) {
if (file_->name() != "net/proto2/proto/descriptor.proto") {
format(
"// Force running AddDescriptors() at dynamic initialization time.\n"
"static bool $1$ = ("
" ::$proto_ns$::internal::AddDescriptors(&$desc_table$), true);\n",
"static bool $1$ = (static_cast<void>("
"::$proto_ns$::internal::AddDescriptors(&$desc_table$)), true);\n",
UniqueName("dynamic_init_dummy", file_, options_));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment