Skip to content
Open
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: 3 additions & 1 deletion src/emc/usr_intf/axis/extensions/emcmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,9 @@ static PyObject *pydraw_lines(PyObject * /*s*/, PyObject *o) {
if(!first) glEnd();
return NULL;
}
if(first || memcmp(p1, pl, sizeof(p1))

// cppcheck-suppress uninitvar
if(first || memcmp(p1, pl, sizeof(p1)) // <- since first==1 when pl undefined
|| (for_selection && n != nl)) {
if(!first) glEnd();
if(for_selection && n != nl) {
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