diff --git a/ThirdParty/Ert/devel/libecl/src/ecl_nnc_export.c b/ThirdParty/Ert/devel/libecl/src/ecl_nnc_export.c index 1c32021078..330cb36354 100644 --- a/ThirdParty/Ert/devel/libecl/src/ecl_nnc_export.c +++ b/ThirdParty/Ert/devel/libecl/src/ecl_nnc_export.c @@ -37,7 +37,7 @@ static void ecl_nnc_export__( const ecl_grid_type * grid , int lgr_index1 , con int nnc_index = *nnc_offset; int lgr_nr1 = ecl_grid_get_lgr_nr( grid ); int global_index1; - ecl_grid_type * global_grid = ecl_grid_get_global_grid( grid ); + const ecl_grid_type * global_grid = ecl_grid_get_global_grid( grid ); if (!global_grid) global_grid = grid; @@ -54,11 +54,12 @@ static void ecl_nnc_export__( const ecl_grid_type * grid , int lgr_index1 , con int lgr_nr2 = nnc_vector_get_lgr_nr( nnc_vector ); const ecl_kw_type * tran_kw = ecl_nnc_export_get_tranx_kw(global_grid , init_file , lgr_nr1 , lgr_nr2 ); int index2; + ecl_nnc_type nnc; + + nnc.grid_nr1 = lgr_nr1; + nnc.grid_nr2 = lgr_nr2; + nnc.global_index1 = global_index1; - ecl_nnc_type nnc = {.grid_nr1 = lgr_nr1 , - .grid_nr2 = lgr_nr2 , - .global_index1 = global_index1 }; - for (index2 = 0; index2 < nnc_vector_get_size( nnc_vector ); index2++) { nnc.global_index2 = int_vector_iget( grid2_index_list , index2 ); nnc.trans = ecl_kw_iget_as_double( tran_kw , int_vector_iget( nnc_index_list , index2)); diff --git a/ThirdParty/Ert/devel/libecl/src/nnc_info.c b/ThirdParty/Ert/devel/libecl/src/nnc_info.c index dd6cbd4d28..b25c9b8ada 100644 --- a/ThirdParty/Ert/devel/libecl/src/nnc_info.c +++ b/ThirdParty/Ert/devel/libecl/src/nnc_info.c @@ -148,9 +148,11 @@ void nnc_info_fprintf(const nnc_info_type * nnc_info , FILE * stream) { int lgr_index = int_vector_iget( nnc_info->lgr_index_map , lgr_nr ); if (lgr_index >= 0) { printf(" %02d -> %02d => ",lgr_nr , lgr_index); - const int_vector_type * index_list = nnc_info_iget_grid_index_list( nnc_info , lgr_index ); - int_vector_fprintf( index_list , stream , " " , "%d"); - printf("\n"); + { + const int_vector_type * index_list = nnc_info_iget_grid_index_list( nnc_info , lgr_index ); + int_vector_fprintf( index_list , stream , " " , "%d"); + printf("\n"); + } } } }