Cleanup clang warnings. (#8546)
This commit is contained in:
parent
ae7d5bf617
commit
d1b5767a82
@ -21,7 +21,12 @@ NODEPS:=clean distclean
|
||||
|
||||
# Default settings
|
||||
STD=-pedantic -DREDIS_STATIC=''
|
||||
|
||||
# Use -Wno-c11-extensions on clang, either where explicitly used or on
|
||||
# platforms we can assume it's being used.
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
STD+=-Wno-c11-extensions
|
||||
else
|
||||
ifneq (,$(findstring FreeBSD,$(uname_S)))
|
||||
STD+=-Wno-c11-extensions
|
||||
endif
|
||||
|
@ -84,9 +84,9 @@ lwCanvas *lwDrawSchotter(int console_cols, int squares_per_row, int squares_per_
|
||||
* rows. */
|
||||
float angle = 0;
|
||||
if (y > 1) {
|
||||
float r1 = (float)rand() / RAND_MAX / squares_per_col * y;
|
||||
float r2 = (float)rand() / RAND_MAX / squares_per_col * y;
|
||||
float r3 = (float)rand() / RAND_MAX / squares_per_col * y;
|
||||
float r1 = (float)rand() / (float) RAND_MAX / squares_per_col * y;
|
||||
float r2 = (float)rand() / (float) RAND_MAX / squares_per_col * y;
|
||||
float r3 = (float)rand() / (float) RAND_MAX / squares_per_col * y;
|
||||
if (rand() % 2) r1 = -r1;
|
||||
if (rand() % 2) r2 = -r2;
|
||||
if (rand() % 2) r3 = -r3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user