Commit cfc18a27 authored by Kai Germaschewski's avatar Kai Germaschewski
Browse files

msvc: fix some more msvc complaints

including use of `uint` and more stack-allocated arrays
parent e945ae8c
...@@ -190,7 +190,7 @@ void HDF5Common::WriteAdiosSteps() ...@@ -190,7 +190,7 @@ void HDF5Common::WriteAdiosSteps()
hid_t attr = hid_t attr =
H5Acreate(m_FileId, ATTRNAME_NUM_STEPS.c_str(), H5Acreate(m_FileId, ATTRNAME_NUM_STEPS.c_str(),
/*"NumSteps",*/ H5T_NATIVE_UINT, s, H5P_DEFAULT, H5P_DEFAULT); /*"NumSteps",*/ H5T_NATIVE_UINT, s, H5P_DEFAULT, H5P_DEFAULT);
uint totalAdiosSteps = m_CurrentAdiosStep + 1; unsigned int totalAdiosSteps = m_CurrentAdiosStep + 1;
if (m_GroupId < 0) if (m_GroupId < 0)
{ {
...@@ -296,18 +296,16 @@ void HDF5Common::FindVarsFromH5(core::IO &io, hid_t top_id, const char *gname, ...@@ -296,18 +296,16 @@ void HDF5Common::FindVarsFromH5(core::IO &io, hid_t top_id, const char *gname,
hid_t datasetId = H5Dopen(gid, name, H5P_DEFAULT); hid_t datasetId = H5Dopen(gid, name, H5P_DEFAULT);
HDF5TypeGuard d(datasetId, E_H5_DATASET); HDF5TypeGuard d(datasetId, E_H5_DATASET);
char longName[std::strlen(heritage) + std::string longName;
std::strlen(gname) + std::strlen(name) +
10];
if (strcmp(gname, "/") == 0) if (strcmp(gname, "/") == 0)
{ {
sprintf(longName, "/%s", name); longName = std::string("/") + name;
} }
else else
{ {
sprintf(longName, "%s/%s/%s", heritage, gname, longName = std::string(heritage) + "/" + gname +
name); "/" + name;
} }
// CreateVar(io, datasetId, name); // CreateVar(io, datasetId, name);
ReadNativeAttrToIO(io, datasetId, longName); ReadNativeAttrToIO(io, datasetId, longName);
...@@ -1246,7 +1244,7 @@ void HDF5Common::ReadAttrToIO(core::IO &io) ...@@ -1246,7 +1244,7 @@ void HDF5Common::ReadAttrToIO(core::IO &io)
{ {
numAttrs = oinfo.num_attrs; numAttrs = oinfo.num_attrs;
int k = 0; int k = 0;
int MAX_ATTR_NAME_SIZE = 100; const int MAX_ATTR_NAME_SIZE = 100;
for (k = 0; k < numAttrs; k++) for (k = 0; k < numAttrs; k++)
{ {
char attrName[MAX_ATTR_NAME_SIZE]; char attrName[MAX_ATTR_NAME_SIZE];
...@@ -1304,7 +1302,7 @@ void HDF5Common::ReadNativeAttrToIO(core::IO &io, hid_t datasetId, ...@@ -1304,7 +1302,7 @@ void HDF5Common::ReadNativeAttrToIO(core::IO &io, hid_t datasetId,
// consuimg // consuimg
} }
int k = 0; int k = 0;
int MAX_ATTR_NAME_SIZE = 100; const int MAX_ATTR_NAME_SIZE = 100;
for (k = 0; k < numAttrs; k++) for (k = 0; k < numAttrs; k++)
{ {
char attrName[MAX_ATTR_NAME_SIZE]; char attrName[MAX_ATTR_NAME_SIZE];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment