mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fix warnings about assignments in ‘if’ statements
Assignments in ‘if’ statements cause a warning in Clang, asking you to enclose the assignment in brackets (to show that it was intentional).
This commit is contained in:
parent
cf390243b2
commit
848b3ba3ec
@ -177,11 +177,11 @@ struct command find_best_copy (const unsigned char * data, unsigned short positi
|
|||||||
struct command simple = {.command = 7};
|
struct command simple = {.command = 7};
|
||||||
struct command flipped = simple, backwards = simple;
|
struct command flipped = simple, backwards = simple;
|
||||||
short count, offset;
|
short count, offset;
|
||||||
if (count = scan_forwards(data + position, length - position, data, position, &offset))
|
if ((count = scan_forwards(data + position, length - position, data, position, &offset)))
|
||||||
simple = (struct command) {.command = 4, .count = count, .value = offset};
|
simple = (struct command) {.command = 4, .count = count, .value = offset};
|
||||||
if (count = scan_forwards(data + position, length - position, bitflipped, position, &offset))
|
if ((count = scan_forwards(data + position, length - position, bitflipped, position, &offset)))
|
||||||
flipped = (struct command) {.command = 5, .count = count, .value = offset};
|
flipped = (struct command) {.command = 5, .count = count, .value = offset};
|
||||||
if (count = scan_backwards(data, length - position, position, &offset))
|
if ((count = scan_backwards(data, length - position, position, &offset)))
|
||||||
backwards = (struct command) {.command = 6, .count = count, .value = offset};
|
backwards = (struct command) {.command = 6, .count = count, .value = offset};
|
||||||
struct command command;
|
struct command command;
|
||||||
switch (flags / 24) {
|
switch (flags / 24) {
|
||||||
|
Loading…
Reference in New Issue
Block a user