Many changes to reduce complaints from CppCheck. Several latent bugs fixes, but probably some new typos introduced

This commit is contained in:
Gregory Nutt
2014-02-10 18:08:49 -06:00
parent 8b1d3f6698
commit 91b002a043
82 changed files with 1932 additions and 1594 deletions
+3 -3
View File
@@ -1080,10 +1080,10 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
FAR struct inode *inode;
FAR struct inode *inode;
FAR struct ads7843e_dev_s *priv;
int ret = OK;
int i;
int ret;
int i;
ivdbg("setup: %d\n", (int)setup);
DEBUGASSERT(filep && fds);
+3 -5
View File
@@ -1061,12 +1061,10 @@ static int max11802_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int max11802_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
FAR struct inode *inode;
FAR struct inode *inode;
FAR struct max11802_dev_s *priv;
pollevent_t eventset;
int ndx;
int ret = OK;
int i;
int ret;
int i;
ivdbg("setup: %d\n", (int)setup);
DEBUGASSERT(filep && fds);
+2 -1
View File
@@ -381,7 +381,7 @@ int stmpe811_gpioattach(STMPE811_HANDLE handle, uint8_t pinconfig,
{
/* Enable interrupts for this GPIO */
regval &= ~GPIO_PIN(pin);
regval |= GPIO_PIN(pin);
}
else
{
@@ -389,6 +389,7 @@ int stmpe811_gpioattach(STMPE811_HANDLE handle, uint8_t pinconfig,
regval &= ~GPIO_PIN(pin);
}
stmpe811_putreg8(priv, STMPE811_GPIO_EN, regval);
sem_post(&priv->exclsem);
+2 -2
View File
@@ -769,7 +769,7 @@ static void stmpe811_timeout(int argc, uint32_t arg1, ...)
/* Are we still stuck in the pen down state? */
if (priv->sample.contact == CONTACT_MOVE ||
if (priv->sample.contact == CONTACT_DOWN ||
priv->sample.contact == CONTACT_MOVE)
{
/* Yes... is the worker thread available? If not, then apparently
@@ -1127,7 +1127,7 @@ void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta)
*/
ignored:
if (priv->sample.contact == CONTACT_MOVE ||
if (priv->sample.contact == CONTACT_DOWN ||
priv->sample.contact == CONTACT_MOVE)
{
(void)wd_start(priv->wdog, STMPE811_PENUP_TICKS, stmpe811_timeout,