mCRL2org / mCRL2

The Git repository for the mCRL2 toolset.
https://mcrl2.org/
Boost Software License 1.0
88 stars 36 forks source link

cppcheck warnings for grape #616

Closed jgroote closed 15 years ago

jgroote commented 15 years ago

Issue migrated from trac ticket # 613

component: grapemcrl2 | priority: minor | resolution: fixed

2009-06-09 09:42:04: @jkeiren created the issue


Various errors/warnings found by cppcheck, some of which are mainly related to coding style (variables in too broad scopes, passing of variables as const instead of const&), but also memory leaks. If a memory leak still is about a wxWidgets class, please notify me about it, such that I can update the list of ignored classes. (See also the page on cppcheck on the mCRL2 wiki).

[tools/grape/grapeapp/visuals/geometric.h:130]: (style) Function parameter 'p_c' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/visuals/geometric.h:368]: (style) Function parameter 'p_color' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/visuals/geometric.h:378]: (style) Function parameter 'p_color' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/dialogs/textdialog.cpp:69]: (style) The scope of the variable s can be limited
[tools/grape/grapeapp/events/event_channelcommunication.h:171]: (all) Memory leak: grape_event_detach_channel_communication::m_remove_event
[tools/grape/grapeapp/events/event_input.cpp:375]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[tools/grape/grapeapp/events/event_input.cpp:742]: (all) Memory leak: event
[tools/grape/grapeapp/events/event_input.cpp:764]: (all) Memory leak: event
[tools/grape/grapeapp/events/event_input.cpp:790]: (all) Memory leak: event
[tools/grape/grapeapp/visuals/geometric.cpp:209]: (style) Function parameter 'p_color' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/visuals/geometric.cpp:535]: (style) Function parameter 'p_color' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/visuals/geometric.cpp:844]: (style) Function parameter 'p_color' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/visuals/geometric.cpp:873]: (style) Function parameter 'p_color' is passed by value. It could be passed by reference instead.
[tools/grape/grapeapp/visuals/visualchannel_communication.cpp:113]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[tools/grape/libgrape/coordinate.h:25]: (style) The class 'coordinate' has no constructor
[tools/grape/libgrape/coordinate.h:32]: (style) 'operator=' should return something
[tools/grape/libgrape/label.cpp:238]: (style) The scope of the variable text_out can be limited
[tools/grape/libgrape/preamble.cpp:16]: (style) Member variable not initialized in the constructor 'preamble::m_height'
[tools/grape/libgrape/preamble.cpp:16]: (style) Member variable not initialized in the constructor 'preamble::m_width'
[tools/grape/libgrape/xml.cpp:343]: (style) The scope of the variable tt_label_action_params_text can be limited
[tools/grape/libgrape/xml.cpp:474]: (style) The scope of the variable tt_label_action_params_text can be limited
[tools/grape/libgrape/xmlopen.cpp:120]: (style) The scope of the variable preamble_parameters can be limited
[tools/grape/libgrape/xmlopen.cpp:121]: (style) The scope of the variable preamble_variables can be limited
[tools/grape/libgrape/xmlopen.cpp:156]: (style) The scope of the variable preamble_parameter_decl can be limited
[tools/grape/libgrape/xmlopen.cpp:180]: (style) The scope of the variable preamble_local_var_decl can be limited
[tools/grape/libgrape/xmlopen.cpp:480]: (style) The scope of the variable parameter_update can be limited
[tools/grape/libgrape/xmlopen.cpp:665]: (style) The scope of the variable variable_decl can be limited
[tools/grape/libgrape/xmlopen.cpp:742]: (style) The scope of the variable variable_update can be limited
[tools/grape/libgrape/xmlopen.cpp:942]: (style) The scope of the variable variable_decl can be limited
[tools/grape/libgrape/xmlopen.cpp:1019]: (style) The scope of the variable variable_update can be limited
[tools/grape/libgrape/xmlopen.cpp:1551]: (style) The scope of the variable parameter_update can be limited
[tools/grape/mcrl2gen/mcrl2gen.cpp:2157]: (style) The scope of the variable object_name can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1203]: (style) The scope of the variable ref_inits can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1229]: (style) The scope of the variable variable_decls can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1230]: (style) The scope of the variable preamble_parameter_decls can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1231]: (style) The scope of the variable preamble_variable_decls can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1268]: (style) The scope of the variable parameter_assignment can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1502]: (style) The scope of the variable trans_label can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1536]: (style) The scope of the variable trans_label can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1553]: (style) The scope of the variable variable_decl_list can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1554]: (style) The scope of the variable condition can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1555]: (style) The scope of the variable actions can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1556]: (style) The scope of the variable timestamp can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1557]: (style) The scope of the variable variable_updates can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:1844]: (style) The scope of the variable variable_update can be limited
[tools/grape/mcrl2gen/mcrl2gen_validate.cpp:2199]: (style) The scope of the variable ref_inits can be limited
jgroote commented 15 years ago

2009-06-09 09:42:37: @jkeiren edited the issue description

jgroote commented 15 years ago

2009-06-09 09:42:37: @jkeiren commented


Fix layout

jgroote commented 15 years ago

2009-06-09 14:34:02: jnelisse changed status from new to closed

jgroote commented 15 years ago

2009-06-09 14:34:02: jnelisse changed resolution from * to fixed*

jgroote commented 15 years ago

2009-06-09 14:34:02: jnelisse commented


Should be resolved with r6496.