PVS-Studio report
I applied for a one-week trial of PVS-Studio. Here is the result of the analyzer on Vcsn.
1 www.viva64.com/en/w:1:1: error: Help: The documentation for all analyzer warnings is available here: http://www.viva64.com/en/w/.
2 lib/vcsn/dyn/context-parser.cc:269:1: error: V591 Non-void function should return a value.
3 lib/vcsn/dyn/context-parser.cc:292:1: error: V591 Non-void function should return a value.
4 lib/vcsn/dyn/context-parser.cc:337:1: note: V760 Two identical blocks of text were found. The second block begins from line 339.
5 lib/vcsn/dyn/context-parser.cc:484:1: error: V591 Non-void function should return a value.
6 lib/vcsn/dyn/context-printer.hh:15:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: linkflags_.
7 lib/vcsn/misc/escape.cc:23:1: warning: V536 Be advised that the utilized constant value is represented by an octal form. Oct: 0177, Dec: 127.
8 lib/vcsn/misc/stream.cc:99:1: error: V591 Non-void function should return a value.
9 libexec/vcsn-tools.cc:385:1: note: V591 The 'main' function does not return a value, which is equivalent to 'return 0'. It is possible that this is an unintended behavior.
10 vcsn/misc/wet.hh:487:1: note: V659 Declarations of functions with 'begin' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 483, 487.
11 vcsn/misc/wet.hh:488:1: note: V659 Declarations of functions with 'end' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 484, 488.
12 vcsn/misc/wet.hh:613:1: note: V690 The 'iterator_impl' class implements the '=' operator, but lacks a copy constructor. It is dangerous to use such a class.
13 vcsn/misc/wet.hh:696:1: note: V659 Declarations of functions with 'begin' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 690, 696.
14 vcsn/misc/wet.hh:697:1: note: V659 Declarations of functions with 'end' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 691, 697.
15 vcsn/weightset/b.hh:185:1: error: V591 Non-void function should return a value.
16 lib/vcsn/algos/daut.cc:77:1: error: V739 EOF should not be compared with a value of the 'char' type. The '(c = is.get())' should be of the 'int' type.
17 lib/vcsn/algos/daut.cc:81:1: error: V739 EOF should not be compared with a value of the 'char' type. The '(c = is.get())' should be of the 'int' type.
18 lib/vcsn/algos/daut.cc:102:1: error: V739 EOF should not be compared with a value of the 'char' type. The '(c = is.get())' should be of the 'int' type.
19 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/algos/daut.cc' cannot be analyzed.
20 vcsn/misc/signature.hh:54:1: note: V659 Declarations of functions with 'operator []' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 49, 54.
21 lib/vcsn/algos/edit-automaton.cc:46:1: warning: V648 Priority of the '&&' operation is higher than that of the '||' operation.
22 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/algos/edit-automaton.cc' cannot be analyzed.
23 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/algos/efsm.cc' cannot be analyzed.
24 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/algos/fado.cc' cannot be analyzed.
25 vcsn/dyn/registries.hh:27:1: note: V001 A code fragment from 'lib/vcsn/algos/others.cc' cannot be analyzed.
26 vcsn/dyn/registries.hh:27:1: note: V001 A code fragment from 'lib/vcsn/algos/print.cc' cannot be analyzed.
27 vcsn/core/rat/expression.hh:118:1: note: V690 The 'variadic' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
28 vcsn/core/rat/expression.hh:264:1: note: V690 The 'weight_node' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
29 vcsn/weightset/r.hh:129:1: note: V550 An odd precise comparison: v == 0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
30 vcsn/weightset/r.hh:135:1: note: V550 An odd precise comparison: v == 1. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
31 vcsn/weightset/r.hh:141:1: note: V550 An odd precise comparison: l == r. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
32 vcsn/core/rat/expression.hxx:75:1: note: V524 It is odd that the body of 'rbegin' function is fully equivalent to the body of 'begin' function.
33 vcsn/weightset/min-plus.hh:84:1: note: V524 It is odd that the body of 'max' function is fully equivalent to the body of 'zero' function.
34 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/algos/read.cc' cannot be analyzed.
35 lib/vcsn/dot/parse.hh:443:1: note: V690 The 'by_type' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
36 lib/vcsn/dot/parse.hh:676:1: note: V690 The 'by_state' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
37 lib/vcsn/dot/parse.hh:181:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: yybuffer_.
38 lib/vcsn/dot/parse.cc:1:1: error: V002 Some diagnostic messages may contain incorrect line number in this file.
39 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/dot/parse.cc' cannot be analyzed.
40 lib/vcsn/dot/driver.cc:21:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: errors.
41 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/dot/driver.cc' cannot be analyzed.
42 lib/vcsn/dot/scan.cc:1238:1: note: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: yy_hold_char, yy_n_chars, yy_last_accepting_state, yy_last_accepting_cpos, yy_state_ptr, yy_full_match, ...
43 lib/vcsn/dot/scan.cc:1247:1: note: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: yy_hold_char, yy_n_chars, yy_last_accepting_state, yy_last_accepting_cpos, yy_state_ptr, yy_full_match, ...
44 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/dot/scan.cc' cannot be analyzed.
45 lib/vcsn/rat/parse.hh:459:1: note: V690 The 'by_type' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
46 lib/vcsn/rat/parse.hh:752:1: note: V690 The 'by_state' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
47 lib/vcsn/rat/parse.hh:175:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: yybuffer_.
48 lib/vcsn/rat/parse.cc:1:1: error: V002 Some diagnostic messages may contain incorrect line number in this file.
49 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/rat/parse.cc' cannot be analyzed.
50 lib/vcsn/rat/driver.cc:17:1: warning: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: errors.
51 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/rat/driver.cc' cannot be analyzed.
52 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/rat/read.cc' cannot be analyzed.
53 lib/vcsn/rat/scan.ll:91:1: warning: V519 The '(yy_c_buf_p)' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 91, 91.
54 lib/vcsn/rat/scan.ll:185:1: warning: V519 The '(yy_c_buf_p)' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 185, 185.
55 lib/vcsn/rat/scan.cc:1465:1: note: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: yy_hold_char, yy_n_chars, yy_last_accepting_state, yy_last_accepting_cpos, yy_state_ptr, yy_full_match, ...
56 lib/vcsn/rat/scan.cc:1474:1: note: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: yy_hold_char, yy_n_chars, yy_last_accepting_state, yy_last_accepting_cpos, yy_state_ptr, yy_full_match, ...
57 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/vcsn/rat/scan.cc' cannot be analyzed.
58 vcsn/dyn/registries.hh:27:1: note: V001 A code fragment from 'lib/vcsn/algos/algos.cc' cannot be analyzed.
59 vcsn/labelset/nullableset.hh:368:1: error: V591 Non-void function should return a value.
60 vcsn/labelset/nullableset.hh:389:1: error: V591 Non-void function should return a value.
61 vcsn/labelset/nullableset.hh:414:1: error: V591 Non-void function should return a value.
62 vcsn/labelset/nullableset.hh:510:1: error: V591 Non-void function should return a value.
63 vcsn/labelset/letterset.hh:274:1: error: V591 Non-void function should return a value.
64 vcsn/labelset/letterset.hh:288:1: error: V591 Non-void function should return a value.
65 vcsn/core/rat/expansionset.hh:136:1: error: V583 The '?:' operator, regardless of its conditional expression, always returns one and the same value: "]".
66 vcsn/algos/dot.hh:207:1: warning: V636 The 'len / 2' expression was implicitly cast from 'size_t' type to 'float' type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) / Y;.
67 vcsn/algos/to-expansion.hh:62:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: res_.
68 vcsn/algos/reduce.hh:207:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: dimension.
69 vcsn/algos/are-isomorphic.hh:137:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: counterexample, s1tos2_, s2tos1_.
70 vcsn/algos/star-height.hh:30:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: height_.
71 vcsn/algos/to-expression.hh:42:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: size_.
72 vcsn/algos/to-expression.hh:118:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: size_.
73 vcsn/labelset/tupleset.hh:780:1: note: V001 A code fragment from 'lib/ctx/libctx.cc' cannot be analyzed.
74 vcsn/weightset/z.hh:119:1: error: V591 Non-void function should return a value.
75 vcsn/weightset/z.hh:189:1: error: V591 Non-void function should return a value.
76 vcsn/weightset/q.hh:151:1: error: V591 Non-void function should return a value.
77 python/vcsn_cxx.cc:30:1: note: V001 A code fragment from 'python/vcsn_cxx.cc' cannot be analyzed.
Total messages: 77
Filtered messages: 77
Real issues:
-
12 -
27 -
28