mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Many changes to reduce complaints from CppCheck. Several latent bugs fixes, but probably some new typos introduced
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user