Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed bug 1764 - Integer Precision Loss During Compilation

Phil Sampson

/Library/Frameworks/SDL2.framework/Headers/SDL_stdinc.h:345:28: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int'
  • Loading branch information
slouken committed Mar 20, 2013
1 parent 6970497 commit abd7fe5ce0ae207551c5d140cdea2d5254e4dea4
Showing with 2 additions and 3 deletions.
  1. +2 −3 include/SDL_stdinc.h
@@ -342,13 +342,12 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
);
/* !!! FIXME: amd64? */
#else
unsigned int _count = (len);
unsigned int _n = (_count + 3) / 4;
size_t _n = (len + 3) / 4;
Uint32 *_p = SDL_static_cast(Uint32 *, dst);
Uint32 _val = (val);
if (len == 0)
return;
switch (_count % 4)
switch (len % 4)
{
case 0: do { *_p++ = _val;
case 3: *_p++ = _val;

0 comments on commit abd7fe5

Please sign in to comment.