Cleanup add brace (#6545)
* Add braces after if conditions
* More add braces after if conditions
* Add braces after while() conditions
* Fix compilation because of macro being modified
* Add braces to for loop
* Add braces after if/goto
* Move comments up
* Remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements after merge
* Fix inconsistent patterns are xxx == NULL vs !xxx
* More "{}" for "if() break;" and "if() continue;"
* More "{}" after if() short statement
* More "{}" after "if () return;" statement
* More fix inconsistent patterns are xxx == NULL vs !xxx
* Revert some modificaion on SDL_RLEaccel.c
* SDL_RLEaccel: no short statement
* Cleanup 'if' where the bracket is in a new line
* Cleanup 'while' where the bracket is in a new line
* Cleanup 'for' where the bracket is in a new line
* Cleanup 'else' where the bracket is in a new line
This commit is contained in:
@@ -48,33 +48,34 @@ TestTypes(SDL_bool verbose)
|
||||
int error = 0;
|
||||
|
||||
if (badsize(sizeof(Uint8), 1)) {
|
||||
if (verbose)
|
||||
SDL_Log("sizeof(Uint8) != 1, instead = %u\n",
|
||||
(unsigned int)sizeof(Uint8));
|
||||
if (verbose) {
|
||||
SDL_Log("sizeof(Uint8) != 1, instead = %u\n", (unsigned int)sizeof(Uint8));
|
||||
}
|
||||
++error;
|
||||
}
|
||||
if (badsize(sizeof(Uint16), 2)) {
|
||||
if (verbose)
|
||||
SDL_Log("sizeof(Uint16) != 2, instead = %u\n",
|
||||
(unsigned int)sizeof(Uint16));
|
||||
if (verbose) {
|
||||
SDL_Log("sizeof(Uint16) != 2, instead = %u\n", (unsigned int)sizeof(Uint16));
|
||||
}
|
||||
++error;
|
||||
}
|
||||
if (badsize(sizeof(Uint32), 4)) {
|
||||
if (verbose)
|
||||
SDL_Log("sizeof(Uint32) != 4, instead = %u\n",
|
||||
(unsigned int)sizeof(Uint32));
|
||||
if (verbose) {
|
||||
SDL_Log("sizeof(Uint32) != 4, instead = %u\n", (unsigned int)sizeof(Uint32));
|
||||
}
|
||||
++error;
|
||||
}
|
||||
if (badsize(sizeof(Uint64), 8)) {
|
||||
if (verbose)
|
||||
SDL_Log("sizeof(Uint64) != 8, instead = %u\n",
|
||||
(unsigned int)sizeof(Uint64));
|
||||
if (verbose) {
|
||||
SDL_Log("sizeof(Uint64) != 8, instead = %u\n", (unsigned int)sizeof(Uint64));
|
||||
}
|
||||
++error;
|
||||
}
|
||||
if (verbose && !error)
|
||||
if (verbose && !error) {
|
||||
SDL_Log("All data types are the expected size.\n");
|
||||
}
|
||||
|
||||
return (error ? 1 : 0);
|
||||
return error ? 1 : 0;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -166,7 +167,7 @@ TestEndian(SDL_bool verbose)
|
||||
}
|
||||
++error;
|
||||
}
|
||||
return (error ? 1 : 0);
|
||||
return error ? 1 : 0;
|
||||
}
|
||||
|
||||
static int TST_allmul (void *a, void *b, int arg, void *result, void *expected)
|
||||
@@ -373,15 +374,17 @@ Test64Bit (SDL_bool verbose)
|
||||
unsigned int *rl = (unsigned int *)&result;
|
||||
|
||||
if (!t->routine(&t->a, &t->b, t->arg, &result, &t->expected_result)) {
|
||||
if (verbose)
|
||||
SDL_Log("%s(0x%08X%08X, 0x%08X%08X, %3d, produced: 0x%08X%08X, expected: 0x%08X%08X\n",
|
||||
t->operation, al[1], al[0], bl[1], bl[0], t->arg, rl[1], rl[0], el[1], el[0]);
|
||||
if (verbose) {
|
||||
SDL_Log("%s(0x%08X%08X, 0x%08X%08X, %3d, produced: 0x%08X%08X, expected: 0x%08X%08X\n", t->operation, al[1], al[0], bl[1], bl[0],
|
||||
t->arg, rl[1], rl[0], el[1], el[0]);
|
||||
}
|
||||
++failed;
|
||||
}
|
||||
}
|
||||
if (verbose && (failed == 0))
|
||||
if (verbose && (failed == 0)) {
|
||||
SDL_Log("All 64bit instrinsic tests passed\n");
|
||||
return (failed ? 1 : 0);
|
||||
}
|
||||
return failed ? 1 : 0;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -408,7 +411,7 @@ TestCPUInfo(SDL_bool verbose)
|
||||
SDL_Log("LASX %s\n", SDL_HasLASX()? "detected" : "not detected");
|
||||
SDL_Log("System RAM %d MB\n", SDL_GetSystemRAM());
|
||||
}
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -437,7 +440,7 @@ TestAssertions(SDL_bool verbose)
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user