fix initialization of variable (was not following ISO C++ rules)
authorMario de Sousa <msousa@fe.up.pt>
Thu, 14 Sep 2017 10:50:41 +0100
changeset 1061 f762b43c8fad
parent 1060 01c48180af05
child 1062 814acf353c69
child 1071 7fd69f29320a
fix initialization of variable (was not following ISO C++ rules)
stage4/generate_c/generate_c.cc
--- a/stage4/generate_c/generate_c.cc	Wed Aug 30 22:13:26 2017 +0100
+++ b/stage4/generate_c/generate_c.cc	Thu Sep 14 10:50:41 2017 +0100
@@ -222,7 +222,7 @@
 /* getsubopt isn't supported with mingw, 
  *  then stage4 options aren't available on windows*/
 void stage4_print_options(void) {}
-int  stage4_parse_options(char *options) {}
+int  stage4_parse_options(char *options) {return 0;}
 #endif 
 
 /***********************************************************************/
@@ -2201,11 +2201,13 @@
  */
 class generate_c_backup_config_c: public generate_c_base_and_typeid_c {
   private:
-    const char *func_to_call = NULL; // will later be set to either "_backup__" or "_restore__"
+    const char *func_to_call; // parameter to pass data from: void *visit(configuration_declaration_c *)
+                              //                          to: void *visit(resource_declaration_c *)
 
   public:
     generate_c_backup_config_c(stage4out_c *s4o_ptr)
       : generate_c_base_and_typeid_c(s4o_ptr) {
+      func_to_call = NULL;
     };
 
     virtual ~generate_c_backup_config_c(void) {}