Lib: initialize fields in constructors

fixes CID 27962 found by Coverity
This commit is contained in:
Christian Beer 2015-11-05 16:38:26 +01:00
parent 7bee49aaf7
commit dee784fd15
1 changed files with 4 additions and 1 deletions

View File

@ -129,6 +129,7 @@ struct PCI_INFO {
int device_id;
int domain_id;
PCI_INFO(): present(false), bus_id(0), device_id(0),domain_id(0) {}
void write(MIOFILE&);
int parse(XML_PARSER&);
};
@ -214,11 +215,13 @@ struct COPROC {
device_nums[i] = 0;
instance_has_opencl[i] = false;
opencl_device_ids[i] = 0;
opencl_device_indexes[i] = 0;
opencl_device_indexes[i] = 0;
running_graphics_app[i] = true;
}
device_num = 0;
memset(&opencl_prop, 0, sizeof(opencl_prop));
memset(&pci_info, 0, sizeof(pci_info));
last_print_time = 0;
}
inline void clear_usage() {
for (int i=0; i<count; i++) {