Fix cast warnings on clang (#768)

This commit is contained in:
Ebrahim Byagowi 2018-02-10 19:50:11 +03:30 committed by GitHub
parent 8cef3a6199
commit ad575a5f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -508,7 +508,7 @@ struct Supplier
inline const Type operator [] (unsigned int i) const inline const Type operator [] (unsigned int i) const
{ {
if (unlikely (i >= len)) return Type (); if (unlikely (i >= len)) return Type ();
return * (const Type *) ((const char *) head + stride * i); return * (const Type *) (const void *) ((const char *) head + stride * i);
} }
inline void advance (unsigned int count) inline void advance (unsigned int count)
@ -516,7 +516,7 @@ struct Supplier
if (unlikely (count > len)) if (unlikely (count > len))
count = len; count = len;
len -= count; len -= count;
head = (const Type *) ((const char *) head + stride * count); head = (const Type *) (const void *) ((const char *) head + stride * count);
} }
private: private: