mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
More fixes for -Wdeclaration-after-statement
This commit is contained in:
parent
2490166d2d
commit
29dfdd1edc
@ -196,11 +196,14 @@ SDL_FillRect##bpp##MMX(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \
|
|||||||
static void
|
static void
|
||||||
SDL_FillRect1MMX(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
|
SDL_FillRect1MMX(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
|
||||||
{
|
{
|
||||||
|
int i, n;
|
||||||
|
Uint8 *p = NULL;
|
||||||
|
|
||||||
MMX_BEGIN;
|
MMX_BEGIN;
|
||||||
|
|
||||||
while (h--) {
|
while (h--) {
|
||||||
int i, n = w;
|
n = w;
|
||||||
Uint8 *p = pixels;
|
p = pixels;
|
||||||
|
|
||||||
if (n > 63) {
|
if (n > 63) {
|
||||||
int adjust = 8 - ((uintptr_t)p & 7);
|
int adjust = 8 - ((uintptr_t)p & 7);
|
||||||
@ -231,9 +234,12 @@ DEFINE_MMX_FILLRECT(4, Uint32)
|
|||||||
static void
|
static void
|
||||||
SDL_FillRect1(Uint8 * pixels, int pitch, Uint32 color, int w, int h)
|
SDL_FillRect1(Uint8 * pixels, int pitch, Uint32 color, int w, int h)
|
||||||
{
|
{
|
||||||
|
int n;
|
||||||
|
Uint8 *p = NULL;
|
||||||
|
|
||||||
while (h--) {
|
while (h--) {
|
||||||
int n = w;
|
n = w;
|
||||||
Uint8 *p = pixels;
|
p = pixels;
|
||||||
|
|
||||||
if (n > 3) {
|
if (n > 3) {
|
||||||
switch ((uintptr_t) p & 3) {
|
switch ((uintptr_t) p & 3) {
|
||||||
@ -267,9 +273,12 @@ SDL_FillRect1(Uint8 * pixels, int pitch, Uint32 color, int w, int h)
|
|||||||
static void
|
static void
|
||||||
SDL_FillRect2(Uint8 * pixels, int pitch, Uint32 color, int w, int h)
|
SDL_FillRect2(Uint8 * pixels, int pitch, Uint32 color, int w, int h)
|
||||||
{
|
{
|
||||||
|
int n;
|
||||||
|
Uint8 *p = NULL;
|
||||||
|
|
||||||
while (h--) {
|
while (h--) {
|
||||||
int n = w;
|
n = w;
|
||||||
Uint16 *p = (Uint16 *) pixels;
|
p = (Uint16 *) pixels;
|
||||||
|
|
||||||
if (n > 1) {
|
if (n > 1) {
|
||||||
if ((uintptr_t) p & 2) {
|
if ((uintptr_t) p & 2) {
|
||||||
@ -291,10 +300,12 @@ SDL_FillRect3(Uint8 * pixels, int pitch, Uint32 color, int w, int h)
|
|||||||
Uint8 r = (Uint8) ((color >> 16) & 0xFF);
|
Uint8 r = (Uint8) ((color >> 16) & 0xFF);
|
||||||
Uint8 g = (Uint8) ((color >> 8) & 0xFF);
|
Uint8 g = (Uint8) ((color >> 8) & 0xFF);
|
||||||
Uint8 b = (Uint8) (color & 0xFF);
|
Uint8 b = (Uint8) (color & 0xFF);
|
||||||
|
int n;
|
||||||
|
Uint8 *p = NULL;
|
||||||
|
|
||||||
while (h--) {
|
while (h--) {
|
||||||
int n = w;
|
n = w;
|
||||||
Uint8 *p = pixels;
|
p = pixels;
|
||||||
|
|
||||||
while (n--) {
|
while (n--) {
|
||||||
*p++ = r;
|
*p++ = r;
|
||||||
|
Loading…
Reference in New Issue
Block a user