From: José Fonseca Date: Wed, 23 Mar 2011 16:44:47 +0000 (+0000) Subject: Silence some warnings. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=bb32c5e7bb3be07038c9f8cfc4559d34744bd3d8;p=apitrace Silence some warnings. --- diff --git a/glsize.hpp b/glsize.hpp index 8d46ea5..b42a3ec 100644 --- a/glsize.hpp +++ b/glsize.hpp @@ -79,9 +79,9 @@ __gl_type_size(GLenum type) static inline size_t __glArrayPointer_size(GLint size, GLenum type, GLsizei stride, GLsizei maxIndex) { - GLsizei elementSize = size*__gl_type_size(type); + size_t elementSize = size*__gl_type_size(type); if (!stride) { - stride = elementSize; + stride = (GLsizei)elementSize; } return stride*maxIndex + elementSize; } diff --git a/trace_parser.hpp b/trace_parser.hpp index dfaf42e..f008fb9 100644 --- a/trace_parser.hpp +++ b/trace_parser.hpp @@ -319,7 +319,7 @@ public: size_t size = read_uint(); Blob *blob = new Blob(size); if (size) { - gzread(file, blob->buf, size); + gzread(file, blob->buf, (unsigned)size); } return blob; } @@ -360,7 +360,7 @@ public: return std::string(); } char * buf = new char[len]; - gzread(file, buf, len); + gzread(file, buf, (unsigned)len); std::string value(buf, len); delete [] buf; #if TRACE_VERBOSE