Skip to content

Commit

Permalink
fixed partial variable naming slipped in r4474, fixed some minor warn…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
sf-mensch committed Nov 27, 2021
1 parent 6fb2f08 commit 526151d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
12 changes: 6 additions & 6 deletions cobc/cobc.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static size_t manilink_len;
#endif

static size_t strip_output = 0;
static size_t source_debugging = 0;
static size_t cb_source_debugging = 0; /* note: was moved to global one later, so keep that name already*/

static const char *const cob_csyns[] = {
#ifndef COB_EBCDIC_MACHINE
Expand Down Expand Up @@ -3107,7 +3107,7 @@ process_command_line (const int argc, char **argv)
case 'g':
/* -g : Generate C debug code */
save_all_src = 1;
source_debugging = 1;
cb_source_debugging = 1;
cb_flag_stack_check = 1;
cb_flag_source_location = 1;
#if 1 /* auto-included, may be disabled manually if needed */
Expand Down Expand Up @@ -3902,7 +3902,7 @@ process_command_line (const int argc, char **argv)
}

/* If C debug, do not strip output */
if (source_debugging) {
if (cb_source_debugging) {
strip_output = 0;
}

Expand Down Expand Up @@ -4653,7 +4653,7 @@ process (char *cmd)
if (optimize) {
strcat (buffptr, " OPTIMIZE(40)");
}
if (source_debugging) {
if (cb_source_debugging) {
strcat (buffptr, " DBGVIEW(*ALL)");
}
if (cobc_gen_listing) {
Expand Down Expand Up @@ -7745,7 +7745,7 @@ process_compile (struct filename *fn)
cobc_chk_buff_size (bufflen);

#ifdef _MSC_VER
sprintf (cobc_buffer, source_debugging ?
sprintf (cobc_buffer, cb_source_debugging ?
"%s /c %s %s /Od /MDd /Zi /FR /c /Fa\"%s\" /Fo\"%s\" \"%s\"" :
"%s /c %s %s /MD /c /Fa\"%s\" /Fo\"%s\" \"%s\"",
cobc_cc, cobc_cflags, cobc_include, name,
Expand Down Expand Up @@ -7795,7 +7795,7 @@ process_assemble (struct filename *fn)
cobc_chk_buff_size (bufflen);

#ifdef _MSC_VER
sprintf (cobc_buffer, source_debugging ?
sprintf (cobc_buffer, cb_source_debugging ?
"%s /c %s %s /Od /MDd /Zi /FR /Fo\"%s\" \"%s\"" :
"%s /c %s %s /MD /Fo\"%s\" \"%s\"",
cobc_cc, cobc_cflags, cobc_include,
Expand Down
1 change: 1 addition & 0 deletions cobc/reserved.c
Original file line number Diff line number Diff line change
Expand Up @@ -4737,6 +4737,7 @@ add_reserved_word (const char *word, const char *fname, const int line)
static void
remove_reserved_word_internal (const char *upper_word, const char *fname, const int line)
{
COB_UNUSED (line);
add_amendment (upper_word, fname, -1, 0); /* "line" -1 as we don't want any check here */
}

Expand Down
2 changes: 1 addition & 1 deletion cobc/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -6042,7 +6042,7 @@ cb_build_call (const cb_tree name, const cb_tree args, const cb_tree on_exceptio
}

cb_tree
cb_build_call_parameter (cb_tree arg, int call_mode, int size_mode)
cb_build_call_parameter (cb_tree arg, int call_mode, const int size_mode)
{
cb_tree res;
if (call_mode != CB_CALL_BY_REFERENCE) {
Expand Down
2 changes: 1 addition & 1 deletion cobc/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@ extern void cb_list_exceptions (void);
extern void cb_list_registers (void);
extern void cb_list_system_routines (void);
extern int cb_list_map (cb_tree (*) (cb_tree), cb_tree);
extern void cb_strncpy_upper (char *, const char * const, const size_t);
extern void cb_strncpy_upper (char *, const char * const, size_t);

/* error.c */
extern cb_tree get_cb_error_node (void);
Expand Down
5 changes: 3 additions & 2 deletions libcob/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -5378,7 +5378,7 @@ cob_pre_open (cob_file *f)
if (max > (size_t)COB_FILE_MAX) {
max = (size_t)COB_FILE_MAX;
}
strncpy(file_open_name, f->fcd->fnamePtr, max);
strncpy (file_open_name, f->fcd->fnamePtr, max);
for (i = max - 1; ; i--) {
if (file_open_name[i] && file_open_name[i] != ' ') {
file_open_name[i + 1] = 0;
Expand Down Expand Up @@ -8811,8 +8811,9 @@ cob_sys_extfh (const void *opcode_ptr, void *fcd_ptr)
* Sync FCD3 values to cob_file values
*/
static void
cob_fcd_file_sync (cob_file *f, char *file_open_name)
cob_fcd_file_sync (cob_file *f, char *external_file_open_name)
{
COB_UNUSED (external_file_open_name);
copy_fcd_to_file (f->fcd, f);
}

Expand Down
5 changes: 4 additions & 1 deletion libcob/reportio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ cob_report_terminate (cob_report *r, int ctl)
int
cob_report_generate (cob_report *r, cob_report_line *l, int ctl)
{
cob_report_control *rc, *rp;
cob_report_control *rc;
cob_report_control_ref *rr;
cob_report_line *pl;
static int maxctl,ln,num,gengrp, last_use;
Expand Down Expand Up @@ -1699,6 +1699,7 @@ cob_report_generate (cob_report *r, cob_report_line *l, int ctl)
}
}
if(maxctl > 0) {
cob_report_control *rp;
for(rp = r->controls; rp; rp = rp->next) {
if(rp->sequence < maxctl
&& !rp->data_change) {
Expand Down Expand Up @@ -1797,6 +1798,7 @@ cob_report_generate (cob_report *r, cob_report_line *l, int ctl)
l->suppress = FALSE;
DEBUG_LOG("rw",(" Line# %d SUPPRESSed\n",r->curr_line));
} else {
cob_report_control *rp = NULL;
if(l->fields == NULL
&& l->child != NULL
&& l->child->sister != NULL) {
Expand Down Expand Up @@ -1840,6 +1842,7 @@ cob_report_generate (cob_report *r, cob_report_line *l, int ctl)
last_use = l->use_decl;
return l->use_decl;
}
rr = NULL;
for(pl = l; pl; pl = pl->sister) {
if( NOTDETAIL(pl->flags) ) {
DEBUG_LOG("rw",("B NOT Detail Line 0x%X\n",pl->flags));
Expand Down

0 comments on commit 526151d

Please sign in to comment.