Removing a null pointer reference that was found by -fsanitize=null.
authorTim King <taking@google.com>
Thu, 5 May 2016 17:35:04 +0000 (10:35 -0700)
committerTim King <taking@google.com>
Thu, 5 May 2016 17:35:04 +0000 (10:35 -0700)
src/parser/cvc/Cvc.g

index 5c37a5372d9f329220a568858cab937f9e499b66..4c0516eb6a13d566cfd2e01ff9657de0236da1f8 100644 (file)
@@ -915,7 +915,10 @@ toplevelDeclaration[CVC4::Command*& cmd]
  * A bound variable declaration.
  */
 boundVarDecl[std::vector<std::string>& ids, CVC4::Type& t]
-  : identifierList[ids,CHECK_NONE,SYM_VARIABLE] COLON declareVariables[*(Command**)NULL,t,ids,false]
+@init {
+  Command* local_cmd = NULL;
+}
+  : identifierList[ids,CHECK_NONE,SYM_VARIABLE] COLON declareVariables[local_cmd,t,ids,false]
   ;
 
 /**