bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #65073] [core] warnings and errors reported by "cppcheck"


From: Bjarni Ingi Gislason
Subject: [bug #65073] [core] warnings and errors reported by "cppcheck"
Date: Fri, 22 Dec 2023 13:43:49 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65073>

                 Summary: [core] warnings and errors reported by "cppcheck"
                   Group: GNU roff
               Submitter: bjarniig
               Submitted: Fri 22 Dec 2023 06:43:47 PM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Lint
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 22 Dec 2023 06:43:47 PM UTC By: Bjarni Ingi Gislason <bjarniig>
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]









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65073>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]