bugGNU roff - Bugs: bug #65073, "cppcheck" reports...

 
 

bug #65073: "cppcheck" reports errors, warnings, and notes

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Fri 22 Dec 2023 06:43:47 PM UTC
   
 
Category:  General Severity:  2 - Minor
Item Group:  Build/Installation Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 09 Aug 2024 01:51:28 PM UTC, comment #3: 

Correcting Category.  None of grn, pic, tfmtodit, xtotroff, grohtml, grops, eqn, refer, and indxbib are in the "core".

G. Branden Robinson <gbranden>
Group administrator
Thu 08 Aug 2024 11:10:45 AM UTC, comment #2: 

Setting "Item Group" to "Build/Installation": "A groff component provokes diagnostics from build or other external tools, or outright fails to deploy."

G. Branden Robinson <gbranden>
Group administrator
Sat 23 Dec 2023 07:06:02 PM UTC, comment #1: 

Dropping severity to "Minor" as befits item group "Lint".

G. Branden Robinson <gbranden>
Group administrator
Fri 22 Dec 2023 06:43:47 PM UTC, original submission:  

Subject: warnings and errors reported by "cppcheck"

Cppcheck 2.12.0

cd src
cppcheck *


preproc/grn/hgraph.cpp:835:15: warning: Uninitialized variable: deltaz [uninitvar]
  deltaz[0] = deltaz[npoints - 1];
              ^
preproc/grn/hgraph.cpp:831:17: note: Assuming condition is false
  for (i = 1; i < npoints; ++i) {
                ^
preproc/grn/hgraph.cpp:835:15: note: Uninitialized variable: deltaz
  deltaz[0] = deltaz[npoints - 1];
              ^
preproc/grn/hgraph.cpp:905:15: warning: Uninitialized variable: deltaz [uninitvar]
  deltaz[0] = deltaz[npoints - 1];
              ^
preproc/grn/hgraph.cpp:902:17: note: Assuming condition is false
  for (i = 1; i < npoints; ++i) {
                ^
preproc/grn/hgraph.cpp:905:15: note: Uninitialized variable: deltaz
  deltaz[0] = deltaz[npoints - 1];
              ^
preproc/pic/lex.cpp:25:1: error: There is an unknown macro here somewhere. Configuration is required. If declare_ptable is a macro then please configure it. [unknownMacro]
declare_ptable(char)
^
preproc/pic/object.cpp:952:3: error: There is an unknown macro here somewhere. Configuration is required. If PTABLE_ITERATOR is a macro then please configure it. [unknownMacro]
  PTABLE_ITERATOR(place) iter(tbl) ;
  ^
roff/troff/env.cpp:1322:5: error: Memory leak: sizes [memleak]
    return;
    ^
roff/troff/input.cpp:2654:10: error: Uninitialized variable: buf [uninitvar]
    if ((buf[0] = tok.ch()) != 0) {
         ^
roff/troff/input.cpp:2702:10: warning: Uninitialized variable: buf [uninitvar]
    if ((buf[i] = tok.ch()) == 0 || buf[i] == end)
         ^
roff/troff/input.cpp:2683:15: note: Assignment 'buf=abuf', assigned value is <Uninit>
  char *buf = abuf;
              ^
roff/troff/input.cpp:2702:10: note: Uninitialized variable: buf
    if ((buf[i] = tok.ch()) == 0 || buf[i] == end)
         ^
roff/troff/input.cpp:5366:10: warning: Uninitialized variable: buf [uninitvar]
    if ((buf[i] = tok.ch()) == 0) {
         ^
roff/troff/input.cpp:5344:15: note: Assignment 'buf=abuf', assigned value is <Uninit>
  char *buf = abuf;
              ^
roff/troff/input.cpp:5364:2: note: Assuming condition is false
 && (compatible_flag || input_stack::get_level() == start_level))
 ^
roff/troff/input.cpp:5366:10: note: Uninitialized variable: buf
    if ((buf[i] = tok.ch()) == 0) {
         ^
utils/tfmtodit/tfmtodit.cpp:429:5: error: Resource leak: fp [resourceLeak]
    return 0;
    ^
utils/xtotroff/xtotroff.c:109:50: error: Uninitialized variable: name1 [legacyUninitvar]
    if (!CanonicalizeFontName(names[i], 0 == i ? name1 : name2)) {
                                                 ^
utils/xtotroff/xtotroff.c:109:58: error: Uninitialized variable: name2 [legacyUninitvar]
    if (!CanonicalizeFontName(names[i], 0 == i ? name1 : name2)) {
                                                         ^
devices/grohtml/post-html.cpp:316:1: error: The one definition rule is violated, different classes/structs have the same name 'style' [ctuOneDefinitionRuleViolation]
struct style {
^
devices/grops/ps.cpp:492:1: note: The one definition rule is violated, different classes/structs have the same name 'style'
struct style {
^
devices/grohtml/post-html.cpp:316:1: note: The one definition rule is violated, different classes/structs have the same name 'style'
struct style {
^
devices/grohtml/post-html.cpp:354:1: error: The one definition rule is violated, different classes/structs have the same name 'char_block' [ctuOneDefinitionRuleViolation]
struct char_block {
^
preproc/html/pre-html.cpp:432:1: note: The one definition rule is violated, different classes/structs have the same name 'char_block'
struct char_block {
^
devices/grohtml/post-html.cpp:354:1: note: The one definition rule is violated, different classes/structs have the same name 'char_block'
struct char_block {
^
preproc/eqn/lex.cpp:362:1: error: The one definition rule is violated, different classes/structs have the same name 'top_input' [ctuOneDefinitionRuleViolation]
class top_input : public macro_input {
^
preproc/pic/main.cpp:45:1: note: The one definition rule is violated, different classes/structs have the same name 'top_input'
class top_input : public input {
^
preproc/eqn/lex.cpp:362:1: note: The one definition rule is violated, different classes/structs have the same name 'top_input'
class top_input : public macro_input {
^
libs/libgroff/glyphuni.cpp:41:1: error: The one definition rule is violated, different classes/structs have the same name 'S' [ctuOneDefinitionRuleViolation]
struct S {
^
preproc/refer/command.cpp:634:1: note: The one definition rule is violated, different classes/structs have the same name 'S'
struct S {
^
libs/libgroff/glyphuni.cpp:41:1: note: The one definition rule is violated, different classes/structs have the same name 'S'
struct S {
^
preproc/eqn/box.h:90:1: error: The one definition rule is violated, different classes/structs have the same name 'column' [ctuOneDefinitionRuleViolation]
class column : public box_list {
^
roff/troff/column.cpp:42:1: note: The one definition rule is violated, different classes/structs have the same name 'column'
class column : public output_file {
^
preproc/eqn/box.h:90:1: note: The one definition rule is violated, different classes/structs have the same name 'column'
class column : public box_list {
^
libs/libgroff/nametoindex.cpp:36:1: error: The one definition rule is violated, different classes/structs have the same name 'charinfo' [ctuOneDefinitionRuleViolation]
class charinfo : glyph {
^
roff/troff/charinfo.h:28:1: note: The one definition rule is violated, different classes/structs have the same name 'charinfo'
class charinfo : glyph {
^
libs/libgroff/nametoindex.cpp:36:1: note: The one definition rule is violated, different classes/structs have the same name 'charinfo'
class charinfo : glyph {
^
preproc/refer/command.cpp:95:1: error: The one definition rule is violated, different classes/structs have the same name 'input_stack' [ctuOneDefinitionRuleViolation]
class input_stack {
^
roff/troff/input.cpp:525:1: note: The one definition rule is violated, different classes/structs have the same name 'input_stack'
class input_stack {
^
preproc/refer/command.cpp:95:1: note: The one definition rule is violated, different classes/structs have the same name 'input_stack'
class input_stack {
^
devices/grohtml/post-html.cpp:354:1: error: The one definition rule is violated, different classes/structs have the same name 'char_block' [ctuOneDefinitionRuleViolation]
struct char_block {
^
roff/troff/input.cpp:3238:1: note: The one definition rule is violated, different classes/structs have the same name 'char_block'
struct char_block {
^
devices/grohtml/post-html.cpp:354:1: note: The one definition rule is violated, different classes/structs have the same name 'char_block'
struct char_block {
^
preproc/eqn/text.cpp:468:1: error: The one definition rule is violated, different classes/structs have the same name 'char_info' [ctuOneDefinitionRuleViolation]
struct char_info {
^
utils/hpftodit/hpftodit.cpp:168:1: note: The one definition rule is violated, different classes/structs have the same name 'char_info'
struct char_info {
^
preproc/eqn/text.cpp:468:1: note: The one definition rule is violated, different classes/structs have the same name 'char_info'
struct char_info {
^
devices/grohtml/html.h:37:1: error: The one definition rule is violated, different classes/structs have the same name 'word_list' [ctuOneDefinitionRuleViolation]
class word_list {
^
utils/indxbib/indxbib.cpp:71:1: note: The one definition rule is violated, different classes/structs have the same name 'word_list'
struct word_list {
^
devices/grohtml/html.h:37:1: note: The one definition rule is violated, different classes/structs have the same name 'word_list'
class word_list {
^
roff/troff/input.cpp:3250:1: error: The one definition rule is violated, different classes/structs have the same name 'char_list' [ctuOneDefinitionRuleViolation]
class char_list {
^
utils/tfmtodit/tfmtodit.cpp:594:1: note: The one definition rule is violated, different classes/structs have the same name 'char_list'
struct char_list {
^
roff/troff/input.cpp:3250:1: note: The one definition rule is violated, different classes/structs have the same name 'char_list'
class char_list {
^
libs/libgroff/glyphuni.cpp:41:1: error: The one definition rule is violated, different classes/structs have the same name 'S' [ctuOneDefinitionRuleViolation]
struct S {
^
utils/tfmtodit/tfmtodit.cpp:658:1: note: The one definition rule is violated, different classes/structs have the same name 'S'
struct S {
^
libs/libgroff/glyphuni.cpp:41:1: note: The one definition rule is violated, different classes/structs have the same name 'S'
struct S {
^
nofile:0:0: information: The checking of the file will be interrupted because there are too many #ifdef configurations. Checking of all #ifdef configurations can be forced by --force command line option or from GUI preferences. However that may increase the checking time. For more details, use --enable=information. [toomanyconfigs]


Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-08-09 gbranden CategoryCore General
        Summarywarnings and errors reported by &quot;cppcheck&quot; "cppcheck" reports errors, warnings, and notes
    2024-08-08 gbranden Item GroupLint Build/Installation
    2023-12-27 gbranden Summary[core] warnings and errors reported by &quot;cppcheck&quot; warnings and errors reported by "cppcheck"
    2023-12-23 gbranden Severity3 - Normal 2 - Minor

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code