Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d1b5767a
Unverified
Commit
d1b5767a
authored
Feb 24, 2021
by
Yossi Gottlieb
Committed by
GitHub
Feb 24, 2021
Browse files
Cleanup clang warnings. (#8546)
parent
ae7d5bf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
d1b5767a
...
...
@@ -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
...
...
src/lolwut5.c
View file @
d1b5767a
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment