pvs-studio report
A run of PVS-studio on the current development version (41b47966) reports the followings issues. I guess we want to fix some of them...
1 buddy/src/bddio.c:133:1: note: V576 Incorrect format. Consider checking the fourth actual argument of the 'fprintf' function. The SIGNED integer type argument is expected.
2 buddy/src/kernel.c:777:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
3 buddy/src/kernel.c:778:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
4 buddy/src/kernel.c:779:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
5 buddy/src/kernel.c:780:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
6 buddy/src/kernel.c:784:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
7 buddy/src/kernel.c:785:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
8 buddy/src/kernel.c:789:1: note: V576 Incorrect format. Consider checking the third actual argument of the 'fprintf' function. The SIGNED argument of memsize type is expected.
9 buddy/src/kernel.c:1441:1: warning: V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'bddhash' is lost. Consider assigning realloc() to a temporary pointer.
10 buddy/src/kernel.c:1193:1: note: V524 It is odd that the body of 'bdd_delref' function is fully equivalent to the body of 'bdd_delref_nc' function.
11 buddy/src/pairs.c:143:1: warning: V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'p->result' is lost. Consider assigning realloc() to a temporary pointer.
12 buddy/src/cppext.cxx:194:1: warning: V668 There is no sense in testing the 'set' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
13 buddy/src/cppext.cxx:256:1: warning: V668 There is no sense in testing the 'set' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
14 buddy/src/bddx.h:935:1: note: V524 It is odd that the body of '>' function is fully equivalent to the body of '-' function.
15 spot/misc/formater.hh:117:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: output_.
16 spot/misc/bitvect.hh:116:1: warning: V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'storage_' is lost. Consider assigning realloc() to a temporary pointer.
17 spot/misc/bitvect.hh:175:1: note: V658 A value is being subtracted from the unsigned variable. This can result in an overflow. In such a case, the '<' comparison operation can potentially behave unexpectedly. Consider inspecting the 'bpb - n < count' expression.
18 spot/misc/bitvect.cc:90:1: warning: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: local_storage_.
19 spot/misc/bitvect.cc:98:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: local_storage_.
20 spot/misc/optionmap.cc:189:1: note: V659 Declarations of functions with 'option_map::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: 183, 189.
21 spot/misc/random.cc:112:1: note: V550 An odd precise comparison: r == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
22 spot/misc/timer.hh:215:1: note: V659 Declarations of functions with 'timer' 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: 205, 215.
23 spot/twa/acc.hh:31:1: note: V690 The 'acc_cond' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
24 spot/twa/bdddict.hh:81:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: clone_counts.
25 spot/tl/formula.cc:1280:1: note: V656 Variables 'is_.syntactic_obligation', 'is_.syntactic_recurrence' are initialized through the call to the same function. It's probably an error or un-optimized code. Consider inspecting the 'children[1]->is_syntactic_guarantee()' expression. Check lines: 1279, 1280.
26 spot/tl/formula.cc:1309:1: note: V656 Variables 'is_.syntactic_obligation', 'is_.syntactic_persistence' are initialized through the call to the same function. It's probably an error or un-optimized code. Consider inspecting the 'children[1]->is_syntactic_safety()' expression. Check lines: 1308, 1309.
27 spot/tl/print.cc:894:1: note: V524 It is odd that the body of 'str_sere' function is fully equivalent to the body of 'str_psl' function.
28 spot/tl/print.cc:919:1: note: V524 It is odd that the body of 'str_utf8_sere' function is fully equivalent to the body of 'str_utf8_psl' function.
29 spot/tl/randomltl.cc:217:1: note: V550 An odd precise comparison: total_1_ == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
30 spot/tl/randomltl.cc:219:1: note: V550 An odd precise comparison: total_2_ != 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) > Epsilon.
31 spot/tl/randomltl.cc:224:1: note: V550 An odd precise comparison: total_2_ == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
32 spot/tl/randomltl.cc:226:1: note: V550 An odd precise comparison: total_1_ != 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) > Epsilon.
33 spot/tl/randomltl.cc:231:1: note: V550 An odd precise comparison: total_2_and_more_ == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
34 spot/tl/randomltl.cc:233:1: note: V550 An odd precise comparison: total_1_ != 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) > Epsilon.
35 spot/tl/randomltl.cc:236:1: note: V550 An odd precise comparison: total_2_ == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon.
36 spot/tl/randomltl.cc:415:1: note: V601 The 'true' value is implicitly cast to the integer type. Inspect the second argument.
37 spot/tl/randomltl.cc:416:1: note: V601 The 'false' value is implicitly cast to the integer type. Inspect the second argument.
38 spot/tl/randomltl.cc:474:1: note: V688 The 'simpl_' local variable possesses the same name as one of the class members, which can result in a confusion.
39 spot/tl/randomltl.hh:46:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: total_1_, proba_2_, total_2_, proba_2_or_more_, total_2_and_more_.
40 spot/tl/unabbrev.cc:32:1: note: V525 The code containing the collection of similar blocks. Check items 're_some_bool_', 're_some_f_g_', 're_some_f_g_', 're_some_bool_', 're_some_other_', 're_some_other_', 're_some_other_', 're_some_bool_' in lines 32, 36, 40, 44, 48, 52, 56, 60.
41 spot/tl/simplify.cc:806:1: note: V553 The length of 'simplify_visitor' class's declaration is more than 2000 lines long. You should consider refactoring the code.
42 spot/tl/simplify.cc:3160:1: note: V525 The code containing the collection of similar blocks. Check items 'f1', 'f1', 'f2' in lines 3160, 3163, 3166.
43 spot/twa/acc.cc:302:1: warning: V601 The 'false' value becomes a class object.
44 spot/twa/acc.cc:535:1: error: V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '==' operator.
45 spot/twaalgos/emptiness.hh:386:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: s.
46 spot/twaalgos/gtec/gtec.cc:376:1: note: V688 The 'pos' local variable possesses the same name as one of the class members, which can result in a confusion.
47 spot/twaalgos/gtec/status.cc:28:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: root, cycle_seed.
48 spot/twaalgos/are_isomorphic.cc:138:1: warning: V728 An excessive check can be simplified. The '||' operator is surrounded by opposite expressions 'autdet' and '!autdet'.
49 spot/twaalgos/postproc.hh:181:1: note: V601 The 'true' value is implicitly cast to the integer type.
50 spot/twaalgos/dtwasat.cc:344:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: cand_size, cand_nacc.
51 spot/twaalgos/ltl2tgba_fm.cc:1788:1: warning: V571 Recurring check. The 'fair_loop_approx_' condition was already verified in line 1784.
52 spot/twaalgos/ltl2tgba_fm.cc:1848:1: note: V690 The 'transition' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
53 spot/twaalgos/powerset.cc:248:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: cycles_left_.
54 spot/twaalgos/sbacc.cc:105:1: error: V607 Ownerless expression 'common_out[t.dst]'.
55 spot/twaalgos/stats.cc:129:1: error: V522 Dereferencing of the null pointer 'val_' might take place.
56 spot/twaalgos/stats.cc:243:1: note: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: states_, edges_, trans_, acc_, nondetstates_, deterministic_, ...
57 spot/twaalgos/stutter.cc:101:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: loop_, need_loop_, done_.
58 spot/twaalgos/tau03opt.cc:406:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: pc.
59 spot/twaalgos/tau03opt.cc:411:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: w, ph, phc, ps.
60 spot/ta/taexplicit.hh:144:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: stuttering_reachable_livelock.
61 spot/ta/taexplicit.cc:40:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: i_.
62 spot/ta/taexplicit.cc:46:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: i_.
63 spot/ta/taproduct.hh:33:1: warning: V690 The 'state_ta_product' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
64 spot/ta/taproduct.cc:306:1: error: V757 It is possible that an incorrect variable is compared with nullptr after type conversion using 'dynamic_cast'. Check lines: 306, 307.
65 spot/ta/taproduct.cc:316:1: error: V757 It is possible that an incorrect variable is compared with nullptr after type conversion using 'dynamic_cast'. Check lines: 316, 317.
66 spot/ta/taproduct.cc:69:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: is_stuttering_transition_.
67 spot/taalgos/dot.cc:136:1: warning: V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: artificial_initial_state_.
68 spot/taalgos/tgba2ta.cc:105:1: warning: V668 There is no sense in testing the 'transitions_to_livelock_states' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
69 spot/taalgos/emptinessta.cc:346:1: note: V669 The 'h' argument is a non-constant reference. The analyzer is unable to determine the position at which this argument is being modified. It is possible that the function contains an error.
70 spot/taalgos/emptinessta.cc:37:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: scc, sscc.
71 spot/parsetl/parsetl.hh:283:1: note: V690 The 'by_type' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
72 spot/parsetl/parsetl.hh:451:1: note: V690 The 'by_state' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
73 spot/parsetl/scantl.cc:1:1: error: V002 Some diagnostic messages may contain incorrect line number in this file.
74 spot/parseaut/parseaut.hh:411:1: note: V690 The 'by_type' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
75 spot/parseaut/parseaut.hh:579:1: note: V690 The 'by_state' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
76 spot/parseaut/scanaut.ll:99:1: warning: V519 The '(yy_c_buf_p)' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 99, 99.
77 spot/parseaut/scanaut.ll:161:1: warning: V519 The '(yy_c_buf_p)' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 161, 161.
78 spot/parseaut/scanaut.ll:429:1: note: V601 The 'true' value is implicitly cast to the integer type.
79 spot/parseaut/scanaut.ll:465:1: note: V601 The 'true' value is implicitly cast to the integer type.
80 spot/parsetl/parsetl.yy:970:1: note: V525 The code containing the collection of similar blocks. Check items 'U', 'R', 'R', 'W', 'M' in lines 970, 972, 974, 976, 978.
81 spot/parsetl/parsetl.cc:1:1: error: V002 Some diagnostic messages may contain incorrect line number in this file.
82 spot/parseaut/parseaut.yy:1568:1: note: V526 The 'strncmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
83 spot/parseaut/parseaut.cc:828:1: note: V553 The length of 'parse' function's body is more than 2000 lines long. You should consider refactoring the code.
84 spot/parseaut/parseaut.yy:2072:1: note: V601 The 'true' value is implicitly cast to the integer type.
85 spot/parseaut/parseaut.cc:1:1: error: V002 Some diagnostic messages may contain incorrect line number in this file.
86 spot/ltsmin/ltsmin.cc:946:1: note: V669 The 'ext' argument is a non-constant reference. The analyzer is unable to determine the position at which this argument is being modified. It is possible that the function contains an error.
87 spot/ltsmin/ltsmin.cc:89:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: hash_value, vars.
88 spot/ltsmin/ltsmin.cc:148:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: hash_value, vars.
89 spot/ltsmin/ltsmin.cc:265:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: it_.
90 bin/common_aoutput.cc:331:1: note: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: filename_, location_, haut_name_, aut_name_, aut_word_, haut_word_, ...
91 bin/common_output.cc:181:1: note: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: filename_, line_, prefix_, suffix_, size_, bool_size_, ...
92 bin/common_trans.hh:33:1: warning: V690 The 'translator_spec' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
93 bin/common_trans.cc:567:1: note: V631 Consider inspecting the 'execl' function call. Defining an absolute path to the file or directory is considered a poor style.
94 bin/common_trans.cc:210:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: translator_num.
95 bin/common_trans.hh:67:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: serial_.
96 bin/autfilt.cc:1224:1: warning: V506 Pointer to local variable 'o' is stored outside the scope of this variable. Such a pointer will become invalid.
97 bin/ltl2tgta.cc:130:1: note: V525 The code containing the collection of similar blocks. Check items 'TGBA', 'TGBA', 'BA' in lines 130, 134, 138.
98 bin/ltlcross.cc:257:1: error: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: ambiguous, complete, hoa_str.
99 bin/ltlfilt.cc:728:1: warning: V506 Pointer to local variable 'o' is stored outside the scope of this variable. Such a pointer will become invalid.
100 bin/ltldo.cc:262:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: cmdname, roundval, inputf.
101 bin/randltl.cc:247:1: warning: V506 Pointer to local variable 'o' is stored outside the scope of this variable. Such a pointer will become invalid.
102 bin/randaut.cc:291:1: warning: V506 Pointer to local variable 'o' is stored outside the scope of this variable. Such a pointer will become invalid.
103 bin/randaut.cc:412: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.
104 tests/core/randtgba.cc:615:1: note: V526 The 'strcmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
105 tests/core/randtgba.cc:689:1: note: V526 The 'strcmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
106 tests/core/randtgba.cc:1274:1: note: V526 The 'strcmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
107 tests/core/randtgba.cc:269:1: warning: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: min, max, tot.
108 tests/core/randtgba.cc:377:1: note: V730 Not all members of a class are initialized inside the constructor. Consider inspecting: min_prefix, max_prefix, tot_prefix, min_cycle, max_cycle, tot_cycle, ...
109 tests/core/ikwiad.cc:818:1: note: V526 The 'strcmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.