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
08c26591
Commit
08c26591
authored
Sep 28, 2018
by
antirez
Browse files
Try to avoid issues with GCC pragmas and older compilers.
See issue #5394.
parent
5aa347b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lzf_d.c
View file @
08c26591
...
@@ -52,6 +52,10 @@
...
@@ -52,6 +52,10 @@
#endif
#endif
#endif
#endif
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
unsigned
int
unsigned
int
lzf_decompress
(
const
void
*
const
in_data
,
unsigned
int
in_len
,
lzf_decompress
(
const
void
*
const
in_data
,
unsigned
int
in_len
,
void
*
out_data
,
unsigned
int
out_len
)
void
*
out_data
,
unsigned
int
out_len
)
...
@@ -86,8 +90,6 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
...
@@ -86,8 +90,6 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
#ifdef lzf_movsb
#ifdef lzf_movsb
lzf_movsb
(
op
,
ip
,
ctrl
);
lzf_movsb
(
op
,
ip
,
ctrl
);
#else
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
switch
(
ctrl
)
switch
(
ctrl
)
{
{
case
32
:
*
op
++
=
*
ip
++
;
case
31
:
*
op
++
=
*
ip
++
;
case
30
:
*
op
++
=
*
ip
++
;
case
29
:
*
op
++
=
*
ip
++
;
case
32
:
*
op
++
=
*
ip
++
;
case
31
:
*
op
++
=
*
ip
++
;
case
30
:
*
op
++
=
*
ip
++
;
case
29
:
*
op
++
=
*
ip
++
;
...
@@ -99,7 +101,6 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
...
@@ -99,7 +101,6 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
case
8
:
*
op
++
=
*
ip
++
;
case
7
:
*
op
++
=
*
ip
++
;
case
6
:
*
op
++
=
*
ip
++
;
case
5
:
*
op
++
=
*
ip
++
;
case
8
:
*
op
++
=
*
ip
++
;
case
7
:
*
op
++
=
*
ip
++
;
case
6
:
*
op
++
=
*
ip
++
;
case
5
:
*
op
++
=
*
ip
++
;
case
4
:
*
op
++
=
*
ip
++
;
case
3
:
*
op
++
=
*
ip
++
;
case
2
:
*
op
++
=
*
ip
++
;
case
1
:
*
op
++
=
*
ip
++
;
case
4
:
*
op
++
=
*
ip
++
;
case
3
:
*
op
++
=
*
ip
++
;
case
2
:
*
op
++
=
*
ip
++
;
case
1
:
*
op
++
=
*
ip
++
;
}
}
#pragma GCC diagnostic pop
#endif
#endif
}
}
else
/* back reference */
else
/* back reference */
...
@@ -185,4 +186,6 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
...
@@ -185,4 +186,6 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
return
op
-
(
u8
*
)
out_data
;
return
op
-
(
u8
*
)
out_data
;
}
}
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
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