Fixed Android build warnings and few warnings in specific cnfigurations

This commit is contained in:
Andrey Kamaev
2012-06-13 13:19:43 +00:00
parent 9dac223039
commit 7cccc93bdf
7 changed files with 87 additions and 81 deletions

View File

@@ -225,9 +225,9 @@ void Mat::create(int d, const int* _sizes, int _type)
}catch(...)
{
allocator = 0;
size_t total = alignSize(step.p[0]*size.p[0], (int)sizeof(*refcount));
data = datastart = (uchar*)fastMalloc(total + (int)sizeof(*refcount));
refcount = (int*)(data + total);
size_t totalSize = alignSize(step.p[0]*size.p[0], (int)sizeof(*refcount));
data = datastart = (uchar*)fastMalloc(totalSize + (int)sizeof(*refcount));
refcount = (int*)(data + totalSize);
*refcount = 1;
}
#else