Remove unused f expression from jscode gen. (#5573)
Varadic assignment in javascript where the right hand expression is an
object yields a single set assignment with the right most lefthand variable,
while leaving the other left side expressions undefined.
For example:
var a,b = {}
will only initialize a to undefined. But will set b to the {} value.
--
For this code since f is never used, it is a safe operation to remove
it.
diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc
index fd0367b..71e9ba8 100644
--- a/src/google/protobuf/compiler/js/js_generator.cc
+++ b/src/google/protobuf/compiler/js/js_generator.cc
@@ -2272,7 +2272,7 @@
" * @suppress {unusedLocalVariables} f is only used for nested messages\n"
" */\n"
"$classname$.toObject = function(includeInstance, msg) {\n"
- " var f, obj = {",
+ " var obj = {",
"classname", GetMessagePath(options, desc));
bool first = true;