From: Dan Carpenter <dan.carpenter@oracle.com>
To: hfvogt@gmx.net
Cc: linux-media@vger.kernel.org
Subject: re: [media] af9035: add Avermedia Volar HD (A867R) support
Date: Tue, 2 Oct 2012 11:30:50 +0300 [thread overview]
Message-ID: <20121002083049.GK12398@elgon.mountain> (raw)
Hello Hans-Frieder Vogt,
The patch 540fd4ba0533: "[media] af9035: add Avermedia Volar HD
(A867R) support" from Apr 2, 2012, leads to the following Clang warning:
drivers/media/dvb-frontends/af9033.c:467:20: warning: comparison
of unsigned expression >= 0 is always true
[-Wtautological-compare]
drivers/media/dvb-frontends/af9033.c
464 while (if_frequency > (adc_freq / 2))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if_frequency is unsigned. I worry that this loop doesn't handle integer
underflow properly.
465 if_frequency -= adc_freq;
466
467 if (if_frequency >= 0)
^^^^^^^^^^^^^^^^^
This is always true.
468 spec_inv *= -1;
469 else
470 if_frequency *= -1;
regards,
dan carpenter
reply other threads:[~2012-10-02 8:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121002083049.GK12398@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=hfvogt@gmx.net \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox