Skip to content

Commit 2f31129

Browse files
committed
fix: reflect Copilot reviews
1 parent e346514 commit 2f31129

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

cobj/codegen.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -853,12 +853,10 @@ static void joutput_base(struct cb_field *f) {
853853
// EDIT
854854
/* Base name */
855855
strcpy_identifier_cobol_to_java(name, top->name);
856-
// if (!top->flag_external) {
856+
857857
register_data_storage_list(f, top);
858-
// }
859858

860859
if (!top->flag_base) {
861-
// if (!top->flag_external) {
862860
if (!top->flag_local || top->flag_is_global) {
863861
bl = cobc_malloc(sizeof(struct base_list));
864862
bl->f = top;
@@ -867,7 +865,6 @@ static void joutput_base(struct cb_field *f) {
867865
base_cache = bl;
868866
} else {
869867
if (current_prog->flag_global_use) {
870-
joutput_local("unsigned char\t\t*%s%s = NULL;", CB_PREFIX_BASE, name);
871868
joutput_local("unsigned char\t\t*%s%s = NULL;", CB_PREFIX_BASE, name);
872869
joutput_local("\t/* %s */\n", top->name);
873870
joutput_local("static unsigned char\t*save_%s%s;\n", CB_PREFIX_BASE,
@@ -877,17 +874,12 @@ static void joutput_base(struct cb_field *f) {
877874
joutput_local("\t/* %s */\n", top->name);
878875
}
879876
}
880-
// }
881877
top->flag_base = 1;
882878
}
883879

884-
// if (top->flag_external) {
885-
// joutput("%s%s", CB_PREFIX_BASE, name);
886-
// } else {
887880
if (joutput_field_storage(f, top) && f->offset != 0) {
888881
joutput(".getSubDataStorage(%d)", f->offset);
889882
}
890-
// }
891883

892884
if (cb_field_variable_address(f)) {
893885
for (p = f->parent; p; f = f->parent, p = f->parent) {
@@ -2597,12 +2589,6 @@ static void joutput_initialize(struct cb_initialize *p) {
25972589
int c;
25982590

25992591
f = cb_field(p->var);
2600-
// if (f->flag_external) {
2601-
// joutput_initialize_external(p->var, f);
2602-
// if (!p->flag_statement) {
2603-
// return;
2604-
// }
2605-
// }
26062592
switch (initialize_type(p, f, 1)) {
26072593
case INITIALIZE_NONE:
26082594
break;
@@ -2622,6 +2608,7 @@ static void joutput_initialize(struct cb_initialize *p) {
26222608
break;
26232609
}
26242610
}
2611+
26252612
/*
26262613
* SEARCH
26272614
*/

0 commit comments

Comments
 (0)