Fix the return value of ParseFromString (#19262)
authorGemfield <gemfield@civilnet.cn>
Mon, 15 Apr 2019 19:23:36 +0000 (12:23 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 15 Apr 2019 19:39:29 +0000 (12:39 -0700)
Summary:
Fix the return value of ParseFromString.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19262

Differential Revision: D14937605

Pulled By: ezyang

fbshipit-source-id: 3f441086517186a075efb3d74f09160463b696b3

caffe2/utils/proto_utils.h

index 22ccc63..7014b0c 100644 (file)
@@ -55,6 +55,7 @@ namespace TextFormat {
 inline bool ParseFromString(const string& spec, MessageLite* proto) {
   LOG(FATAL) << "If you are running lite version, you should not be "
              << "calling any text-format protobuffers.";
+  return false;
 }
 } // namespace TextFormat