diff --git a/source/shared_lib/sources/graphics/gl/texture_gl.cpp b/source/shared_lib/sources/graphics/gl/texture_gl.cpp index 561ff3781..e10cfcaa5 100644 --- a/source/shared_lib/sources/graphics/gl/texture_gl.cpp +++ b/source/shared_lib/sources/graphics/gl/texture_gl.cpp @@ -261,7 +261,7 @@ static std::vector getSupportCompressedTextureFormats() { if(Texture::useTextureCompression == true) { printf("------------------------------------------------\n"); printf("**** getSupportCompressedTextureFormats() result.size() = %d, count = %d\n",(int)result.size(),count); - for(int i = 0; i < result.size(); ++i) { + for(unsigned int i = 0; i < result.size(); ++i) { printf("Texture Compression #i = %d, result[i] = %d [%s]\n",i,result[i],getSupportCompressedTextureFormatString(result[i]).c_str()); } printf("------------------------------------------------\n"); diff --git a/source/shared_lib/sources/graphics/pixmap.cpp b/source/shared_lib/sources/graphics/pixmap.cpp index f36a185d2..cb59b70c1 100644 --- a/source/shared_lib/sources/graphics/pixmap.cpp +++ b/source/shared_lib/sources/graphics/pixmap.cpp @@ -351,7 +351,7 @@ void Pixmap1D::init(int components){ void Pixmap1D::init(int w, int components){ this->w= w; this->components= components; - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } uint64 Pixmap1D::getPixelByteCount() const { @@ -402,7 +402,7 @@ void Pixmap1D::loadBmp(const string &path) { components= 3; } if(pixels == NULL) { - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } //data @@ -432,7 +432,7 @@ void Pixmap1D::loadTga(const string &path) { components= fileComponents; } if(pixels == NULL) { - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } //read data @@ -471,7 +471,7 @@ void Pixmap2D::init(int w, int h, int components) { this->w= w; this->h= h; this->components= components; - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } uint64 Pixmap2D::getPixelByteCount() const { @@ -779,7 +779,7 @@ void Pixmap3D::init(int w, int h, int d, int components){ this->h= h; this->d= d; this->components= components; - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } uint64 Pixmap3D::getPixelByteCount() const { @@ -838,7 +838,7 @@ void Pixmap3D::loadSliceBmp(const string &path, int slice){ components= 3; } if(pixels==NULL){ - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } //data @@ -861,7 +861,7 @@ void Pixmap3D::loadSliceTga(const string &path, int slice){ components= fileComponents; } if(pixels==NULL){ - pixels= new uint8[getPixelByteCount()]; + pixels= new uint8[(std::size_t)getPixelByteCount()]; } //read data