SWDEV-306940 - Fix hipamd errors/warnings found by CppCheck

Change-Id: Ia93d4f5262ea4269d8031edbfd27033b887e5300
此提交包含在:
Satyanvesh Dittakavi committed 2022-02-05 08:42:47 -05:00
1 父節點 c792ff7bfc
當前提交 6e562f4d83
21 file changed
+41 -56

No files matched your search

+6 -5
查看文件
@@ -96,7 +96,7 @@ DeviceFunc::~DeviceFunc() {
}
//Abstract functions
Function::Function(std::string name, FatBinaryInfo** modules)
Function::Function(const std::string& name, FatBinaryInfo** modules)
: name_(name), modules_(modules) {
dFunc_.resize(g_devices.size());
}
@@ -167,15 +167,16 @@ hipError_t Function::getStatFuncAttr(hipFuncAttributes* func_attr, int deviceId)
}
//Abstract Vars
Var::Var(std::string name, DeviceVarKind dVarKind, size_t size, int type, int norm,
Var::Var(const std::string& name, DeviceVarKind dVarKind, size_t size, int type, int norm,
FatBinaryInfo** modules) : name_(name), dVarKind_(dVarKind), size_(size),
type_(type), norm_(norm), modules_(modules) {
type_(type), norm_(norm), modules_(modules), managedVarPtr_(nullptr), align_(0) {
dVar_.resize(g_devices.size());
}
Var::Var(std::string name, DeviceVarKind dVarKind, void *pointer, size_t size,
Var::Var(const std::string& name, DeviceVarKind dVarKind, void *pointer, size_t size,
unsigned align, FatBinaryInfo** modules) : name_(name), dVarKind_(dVarKind),
size_(size), modules_(modules), managedVarPtr_(pointer), align_(align) {
size_(size), modules_(modules), managedVarPtr_(pointer), align_(align),
type_(0), norm_(0) {
dVar_.resize(g_devices.size());
}