| 1 |
/* Reduced from a -Wanalyzer-infinite-loop false positive seen in Doom's |
| 2 |
v_video.c, which is under the GPLv2 or later. */ |
| 3 |
|
| 4 |
typedef unsigned char byte; |
| 5 |
|
| 6 |
byte* screens[5]; |
| 7 |
|
| 8 |
#define SCREENWIDTH 320 |
| 9 |
|
| 10 |
void |
| 11 |
V_DrawBlock |
| 12 |
( int x, |
| 13 |
int y, |
| 14 |
int scrn, |
| 15 |
int width, |
| 16 |
int height, |
| 17 |
byte* src ) |
| 18 |
{ |
| 19 |
byte* dest; |
| 20 |
|
| 21 |
/* [...snip...] */ |
| 22 |
|
| 23 |
dest = screens[scrn] + y*SCREENWIDTH+x; |
| 24 |
|
| 25 |
while (height--) /* { dg-bogus "infinite loop" } */ |
| 26 |
{ |
| 27 |
__builtin_memcpy (dest, src, width); |
| 28 |
src += width; |
| 29 |
dest += SCREENWIDTH; |
| 30 |
} |
| 31 |
} |