On Fri, Jun 6, 2025 at 5:28 PM James K. Lowden <jklow...@cobolworx.com> wrote: > > I have committed a change to the master branch in my local repository > with the following message. Since it's my first time, before pushing, > I would like to know if there's any problem with the message itself. > > I have tried to follow patterns I've seen elsewhere. > > It's a bit of a hodgepodge because there are many tiny opportunistic > changes related to cppcheck, almost none of which affect > functionality. It was easier to fix them along the way, while > addressing the diagnostic formatting characters. I stopped when I > needed a checkpoint, because some cppcheck reports will require more > extensive work. > > If I can get the message into acceptable shape, I'll push this change > and return to the remaining cppcheck issues. > > --jkl > > > [snip] > cobol: Diagnostic messages, Flex build, and some cppcheck reports. > [PR120328, PR119695] > > Remove %0x and similar from diagnostic framework messages. Remove %zu > from printf messages because it is not supported on some > platforms. Corrections in response to cppcheck. Sundry small fixes. > > gcc/cobol/ChangeLog: > > PR cobol/120328 > * Make-lang.in: Success with non-English locale. > PR cobol/119695
This second PR reference should go right after the first (or push two different commits). Other than that it looks OK. There is server-side verification for obvious mistakes. Richard. > * except.cc (ec_type_descr): Remove %04s. > (cbl_enabled_exceptions_t::dump): Remove %zu. > * genapi.cc (parser_perform_conditional): Remove %zu. > (parser_perform_conditional_end): Remove %zu. > * lexio.cc (cdftext::process_file): Remove %zu. > * scan_ante.h (scanner_parsing): Remove %zu. > (scanner_parsing_pop): Remove %zu. > (binary_integer_usage): Remove %zu. > cppcheck > * exceptg.h (class exception_turn_t): Explicit constructor. > * inspect.h (struct cbx_inspect_match_t): Const reference. > (struct cbx_inspect_t): Const parameter. > * cdfval.h (cdf_value): Const parameter. > * copybook.h (class copybook_elem_t): Initialization. > (class uppername_t): Explicit constructor. > * symbols.cc (symbol_table_extend): Explicit constructor. > (elementize): Const parameter. > (is_variable_length): Correct always-false. > (symbols_update): Remove unnecessary shadow variable. > (struct symbol_elem_t): Const parameter. > (symbol_alphabet_add): Const parameter. > (new_literal_add): Initialization. > * symbols.h (class cbl_domain_elem_t): Correct assignment. > (struct cbl_span_t): Improve constructor. > (struct cbl_refer_t): Initialization. > (struct cbl_alphabet_t): Rename shadow variable. > (struct cbl_file_key_t): Remove unused constructor. > (struct symbol_elem_t): Initialization. > (struct cbl_until_addresses_t): Use unsigned int, for messages. > (struct cbl_prog_hier_t): Initialization. > (struct cbl_perform_tgt_t): Repair constructor. > (struct cbl_label_t): Const parameter. > (symbol_typedef_add): Const parameter. > (symbol_field_add): Explicit constructor. > (symbol_label_add): Explicit constructor. > (symbol_program_add): Remove C-style "struct" use. > (symbol_special_add): Remove C-style "struct" use. > (symbol_alphabet_add): Const parameter. > (symbol_file_add): Remove C-style "struct" use. > (symbol_section_add): Remove C-style "struct" use. > * symfind.cc: Const parameter. > Other > * lexio.h (struct YYLTYPE): Remove unneeded struct. > (YYLTYPE_IS_DECLARED): Same. > (YYLTYPE_IS_TRIVIAL): Same. > * scan.l: Scan function names without swallowing whitespace. > * cdf-copy.cc (copybook_elem_t::open_file): Indentation. > * cdf.y: YYABORT on certain errors. > * scan_post.h (prelex): Correct post-CDF resumption. > (yylex): Clearer message. > * util.cc (gb4): New function. > * util.h (gb4): New function. > * TODO: New file. > > [pins]