diff --git a/cobc/cobc.c b/cobc/cobc.c index eccae779b..3b2eeae4a 100644 --- a/cobc/cobc.c +++ b/cobc/cobc.c @@ -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 @@ -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 */ @@ -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; } @@ -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) { @@ -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, @@ -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, diff --git a/cobc/reserved.c b/cobc/reserved.c index c17c8a0d9..f6eb0e42e 100644 --- a/cobc/reserved.c +++ b/cobc/reserved.c @@ -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 */ } diff --git a/cobc/tree.c b/cobc/tree.c index 52229122f..00935eff8 100644 --- a/cobc/tree.c +++ b/cobc/tree.c @@ -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) { diff --git a/cobc/tree.h b/cobc/tree.h index 30234cf59..dac7720a7 100644 --- a/cobc/tree.h +++ b/cobc/tree.h @@ -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); diff --git a/libcob/fileio.c b/libcob/fileio.c index a55dbc581..a7bff91ac 100644 --- a/libcob/fileio.c +++ b/libcob/fileio.c @@ -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; @@ -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); } diff --git a/libcob/reportio.c b/libcob/reportio.c index 2fcdbb36b..5920282ad 100644 --- a/libcob/reportio.c +++ b/libcob/reportio.c @@ -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; @@ -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) { @@ -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) { @@ -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));