@@ -395,7 +395,8 @@ void write_yaml_from_struct_3 (char *yamlname, int asize, struct fmsyamloutkeys
395395 char * curr_topkey = topkeys -> level2key ;
396396
397397 /* loop through the top level 2 keys */
398- for (int top_ind = 0 ; top_ind < topkeys -> level2key_offset ; top_ind ++ ) {
398+ int top_ind ;
399+ for (top_ind = 0 ; top_ind < topkeys -> level2key_offset ; top_ind ++ ) {
399400 /* Start the secodn level event */
400401 yaml_scalar_event_initialize (& event , NULL , (yaml_char_t * )YAML_STR_TAG ,
401402 (yaml_char_t * )curr_topkey , strlen (curr_topkey ), 1 , 0 ,
@@ -412,7 +413,8 @@ void write_yaml_from_struct_3 (char *yamlname, int asize, struct fmsyamloutkeys
412413 return ;
413414 }
414415 /* loop through the structs for this key*/
415- for (int s2 = 0 ; s2 < lvl2keyeach [top_ind ]; s2 ++ ){
416+ int s2 ;
417+ for (s2 = 0 ; s2 < lvl2keyeach [top_ind ]; s2 ++ ){
416418 yaml_mapping_start_event_initialize (& event , NULL , (yaml_char_t * )YAML_MAP_TAG ,
417419 1 , YAML_ANY_MAPPING_STYLE );
418420 if (!yaml_emitter_emit (& emitter , & event )){
@@ -424,7 +426,8 @@ void write_yaml_from_struct_3 (char *yamlname, int asize, struct fmsyamloutkeys
424426
425427 /* Next level keys */
426428 char * curr_l2key = (& l2keys [s2count ])-> level2key ;
427- for (int l2_ind = 0 ; l2_ind < (& l2keys [s2count ])-> level2key_offset ; l2_ind ++ ) {
429+ int l2_ind ;
430+ for (l2_ind = 0 ; l2_ind < (& l2keys [s2count ])-> level2key_offset ; l2_ind ++ ) {
428431 /* Start the third level event */
429432 yaml_scalar_event_initialize (& event , NULL , (yaml_char_t * )YAML_STR_TAG ,
430433 (yaml_char_t * )curr_l2key , strlen (curr_l2key ), 1 , 0 ,
@@ -444,7 +447,8 @@ void write_yaml_from_struct_3 (char *yamlname, int asize, struct fmsyamloutkeys
444447 int s3start = s3count ;
445448 int s3end = s3start + n3each [i_n3 ];
446449 i_n3 ++ ;
447- for (int s3 = s3start ; s3 < s3end ; s3 ++ ){
450+ int s3 ;
451+ for (s3 = s3start ; s3 < s3end ; s3 ++ ){
448452 yaml_mapping_start_event_initialize (& event , NULL , (yaml_char_t * )YAML_MAP_TAG ,
449453 1 , YAML_ANY_MAPPING_STYLE );
450454 if (!yaml_emitter_emit (& emitter , & event )){
0 commit comments