Commit 9a61ef2c authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Fix some warnings

parent b31b40d1
......@@ -44,8 +44,8 @@ protected:
FileView()
: m_nReferenceCount(1)
, m_nPos(0)
, m_pData(nullptr)
, m_nPos(0)
, m_nSize(0)
{
}
......
......@@ -35,15 +35,6 @@ static void s2ws(const std::string& source, std::wstring& target)
MultiByteToWideChar(CP_UTF8, 0, source.c_str(), slength, &target[0], len);
}
static void sw2s(const std::wstring& source, std::string& target)
{
int len;
int slength = (int)source.length() + 1;
len = WideCharToMultiByte(CP_UTF8, 0, source.c_str(), slength, 0, 0, 0, false);
target.resize(len);
WideCharToMultiByte(CP_UTF8, 0, source.c_str(), slength, &target[0], len, 0, false);
}
static std::string error_to_string(DWORD error)
{
LPVOID lpMsgBuf;
......@@ -67,14 +58,8 @@ static void set_io_error(DWORD error, IOError &io_error)
io_error.string = error_to_string(error);
}
static void set_io_error(DWORD error, std::string &error_string_prefix, IOError &io_error)
{
io_error.code = error;
io_error.string = error_string_prefix + error_to_string(error);
}
template<size_t N>
static void set_io_error(DWORD error, const char (&error_string_prefix)[N], IOError &io_error)
void set_io_error(DWORD error, const char (&error_string_prefix)[N], IOError &io_error)
{
io_error.code = error;
io_error.string = std::string(error_string_prefix, N) + error_to_string(error);
......@@ -274,7 +259,7 @@ void File::close()
{
assert(isOpen());
BOOL isOK = CloseHandle(_pxPlatformHandle);
CloseHandle(_pxPlatformHandle);
_pxPlatformHandle = 0;
_cFileName.clear();
......@@ -412,7 +397,7 @@ FileView *File::createFileView(int64_t nPos, int64_t nSize, bool isPopulate, IOE
if(!m_pFileMappingObject)
{
if (!FileView::SystemFileMappingObject::open(&m_pFileMappingObject, *this, error))
return false;
return nullptr;
}
FileView *ret = new SystemFileView(m_pFileMappingObject, nPos, nSize, isPopulate, error);
if (error.code)
......
......@@ -104,12 +104,12 @@ static uint32_t getElementSize(VolumeDataChannelDescriptor::Format format, Volum
}
}
static uint32_t getElementSize(const DataBlock &datablock)
inline uint32_t getElementSize(const DataBlock &datablock)
{
return getElementSize(datablock.format, datablock.components);
}
static uint32_t getByteSize(const int32_t (&size)[DataStoreDimensionality_Max], VolumeDataChannelDescriptor::Format format, VolumeDataChannelDescriptor::Components components, bool isBitSize = true)
inline uint32_t getByteSize(const int32_t (&size)[DataStoreDimensionality_Max], VolumeDataChannelDescriptor::Format format, VolumeDataChannelDescriptor::Components components, bool isBitSize = true)
{
int byteSize = size[0] * getElementSize(format, components);
......
......@@ -583,12 +583,4 @@ void VolumeDataAccessManagerImpl::getCurrentUploadError(const char** objectId, i
*errorString = error->error.string.c_str();
lock.unlock();
}
void VolumeDataAccessManagerImpl::addUploadError(const Error& error, VolumeDataLayer* layer, uint64_t chunk)
{
std::string urlString = createUrlForChunk(getLayerName(*layer), chunk);
std::unique_lock<std::mutex> lock(m_mutex);
m_uploadErrors.emplace_back(new UploadError(error, urlString));
}
}
......@@ -217,7 +217,6 @@ public:
int32_t uploadErrorCount() override;
void getCurrentUploadError(const char **objectId, int32_t *errorCode, const char **errorString) override;
void addUploadError(const Error &error, VolumeDataLayer *layer, uint64_t chunk);
private:
VDSHandle &m_handle;
IOManager *m_ioManager;
......
......@@ -897,8 +897,6 @@ void Wavelet::inverseTransform(float *source)
int32_t bufferPitchXY = (bandSizeX + 3) & ~3;
int32_t bufferPitchX = bufferPitchXY * bandSizeZ; // Swapping pitches is faster.
int32_t bitCount[8] = { 0, 1, 1, 2, 1, 2, 2, 3 };
int32_t readPitchX = m_allocatedSizeX;
int32_t readPitchXY = m_allocatedSizeXY;
int32_t writePitchX = bufferPitchX;
......
......@@ -537,9 +537,6 @@ Wavelet_InverseTransformLine(float* readWrite, int32_t nLength)
inline void
Wavelet_InterleaveLine(float* write, float* readLow, float* readHigh, int32_t nLength)
{
int32_t nLengthLow = (nLength + 1) >> 1;
int32_t nLengthHigh = nLength >> 1;
int32_t i = 0;
for (; i + 8 <= nLength; i += 8)
......
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