Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/emc/usr_intf/axis/extensions/emcmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,10 @@ static PyObject *pydraw_lines(PyObject * /*s*/, PyObject *o) {
if(!first) glEnd();
return NULL;
}

// Suppress cppcheck false positive:
// 'first' == 1 when 'pl' is undefined and therefore not a problem.
// cppcheck-suppress uninitvar
if(first || memcmp(p1, pl, sizeof(p1))
|| (for_selection && n != nl)) {
if(!first) glEnd();
Expand Down
3 changes: 3 additions & 0 deletions src/libnml/cms/cms_cfg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ int load_nml_config_file(const char *file)
if (strlen(file) >= 80) {
rcs_print_error("cms_config: file name too long\n");
loading_config_file = 0;
delete info->lines_list; // info is a struct
delete info;
return -1;
}
rtapi_strlcpy(info->file_name, file, 80);
Expand All @@ -122,6 +124,7 @@ int load_nml_config_file(const char *file)
if (fp == NULL) {
rcs_print_error("cms_config: can't open '%s'. Error = %d -- %s\n",
file, errno, strerror(errno));
delete info->lines_list; // info is a struct
delete info;
loading_config_file = 0;
return -1;
Expand Down
Loading