diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-27 15:14:01 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-28 05:38:44 -0400 |
commit | 830e4b55b02b8a2638958e4249eba71797940ee5 (patch) | |
tree | 06266c34cf84b9a4e5092df3534ff4fdbbdda495 /drivers/media/dvb-frontends/cx22700.c | |
parent | 5a70972e142b182fb9375b9060a4dd9fad47fadf (diff) |
[media] dvb-frontends: get rid of some "always false" warnings
On gcc, enums are generally unsigned, except if a negative value
is declared. Due to that, warnings may happen there:
drivers/media/dvb-frontends/cx22700.c:142:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/dvb-frontends/cx22700.c:155:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/dvb-frontends/cx24123.c:341:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/dvb-frontends/l64781.c:183:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/dvb-frontends/l64781.c:187:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/dvb-frontends/mt312.c:552:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/dvb-frontends/mt312.c:560:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
As other compilers might be using signed values, the better is to
keep the checks there, casting the value to avoid the warning.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/cx22700.c')
-rw-r--r-- | drivers/media/dvb-frontends/cx22700.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/cx22700.c b/drivers/media/dvb-frontends/cx22700.c index f2a90f990ce3..3d399d9a6343 100644 --- a/drivers/media/dvb-frontends/cx22700.c +++ b/drivers/media/dvb-frontends/cx22700.c | |||
@@ -139,7 +139,7 @@ static int cx22700_set_tps(struct cx22700_state *state, | |||
139 | if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) | 139 | if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) |
140 | return -EINVAL; | 140 | return -EINVAL; |
141 | 141 | ||
142 | if (p->guard_interval < GUARD_INTERVAL_1_32 || | 142 | if ((int)p->guard_interval < GUARD_INTERVAL_1_32 || |
143 | p->guard_interval > GUARD_INTERVAL_1_4) | 143 | p->guard_interval > GUARD_INTERVAL_1_4) |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | 145 | ||
@@ -152,7 +152,7 @@ static int cx22700_set_tps(struct cx22700_state *state, | |||
152 | p->modulation != QAM_64) | 152 | p->modulation != QAM_64) |
153 | return -EINVAL; | 153 | return -EINVAL; |
154 | 154 | ||
155 | if (p->hierarchy < HIERARCHY_NONE || | 155 | if ((int)p->hierarchy < HIERARCHY_NONE || |
156 | p->hierarchy > HIERARCHY_4) | 156 | p->hierarchy > HIERARCHY_4) |
157 | return -EINVAL; | 157 | return -EINVAL; |
158 | 158 | ||