Eliminate warnings

This commit is contained in:
Gregory Nutt 2014-10-11 17:02:35 -06:00
parent 0c1c37bae2
commit 1a27a4d4c0
2 changed files with 12 additions and 21 deletions

View File

@ -291,7 +291,7 @@ static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv,
sem_post(&priv->exclsem); sem_post(&priv->exclsem);
/* Try to get the a sample... if we cannot, then wait on the semaphore /* Try to get the a sample... if we cannot, then wait on the semaphore
* that is posted when new sample data is availble. * that is posted when new sample data is available.
*/ */
while (stmpe811_sample(priv, sample) < 0) while (stmpe811_sample(priv, sample) < 0)
@ -368,7 +368,7 @@ static int stmpe811_open(FAR struct file *filep)
ret = sem_wait(&priv->exclsem); ret = sem_wait(&priv->exclsem);
if (ret < 0) if (ret < 0)
{ {
/* This should only happen if the wait was canceled by an signal */ /* This should only happen if the wait was cancelled by an signal */
DEBUGASSERT(errno == EINTR); DEBUGASSERT(errno == EINTR);
return -EINTR; return -EINTR;
@ -702,7 +702,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds,
if (i >= CONFIG_STMPE811_NPOLLWAITERS) if (i >= CONFIG_STMPE811_NPOLLWAITERS)
{ {
idbg("ERROR: No availabled slot found: %d\n", i); idbg("ERROR: No available slot found: %d\n", i);
fds->priv = NULL; fds->priv = NULL;
ret = -EBUSY; ret = -EBUSY;
goto errout; goto errout;
@ -879,7 +879,7 @@ static inline void stmpe811_tscinitialize(FAR struct stmpe811_dev_s *priv)
* *
* Description: * Description:
* Enable TSC functionality. GPIO4-7 must be available. This function * Enable TSC functionality. GPIO4-7 must be available. This function
* will register the touchsceen driver as /dev/inputN where N is the minor * will register the touchscreen driver as /dev/inputN where N is the minor
* device number * device number
* *
* Input Parameters: * Input Parameters:
@ -972,12 +972,11 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor)
void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta) void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta)
{ {
FAR struct stmpe811_config_s *config; /* Convenience pointer */
bool pendown; /* true: pend is down */
uint16_t xdiff; /* X difference used in thresholding */ uint16_t xdiff; /* X difference used in thresholding */
uint16_t ydiff; /* Y difference used in thresholding */ uint16_t ydiff; /* Y difference used in thresholding */
uint16_t x; /* X position */ uint16_t x; /* X position */
uint16_t y; /* Y position */ uint16_t y; /* Y position */
bool pendown; /* true: pen is down */
ASSERT(priv != NULL); ASSERT(priv != NULL);
@ -985,13 +984,6 @@ void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta)
(void)wd_cancel(priv->wdog); (void)wd_cancel(priv->wdog);
/* Get a pointer the callbacks for convenience (and so the code is not so
* ugly).
*/
config = priv->config;
DEBUGASSERT(config != NULL);
/* Check for pen up or down from the TSC_STA ibit n the STMPE811_TSC_CTRL register. */ /* Check for pen up or down from the TSC_STA ibit n the STMPE811_TSC_CTRL register. */
pendown = (stmpe811_getreg8(priv, STMPE811_TSC_CTRL) & TSC_CTRL_TSC_STA) != 0; pendown = (stmpe811_getreg8(priv, STMPE811_TSC_CTRL) & TSC_CTRL_TSC_STA) != 0;
@ -1018,7 +1010,7 @@ void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta)
} }
/* A pen-down to up transition has been detected. CONTACT_UP indicates the /* A pen-down to up transition has been detected. CONTACT_UP indicates the
* initial loss of contzt. The state will be changed to CONTACT_NONE * initial loss of contact. The state will be changed to CONTACT_NONE
* after the loss of contact is sampled. * after the loss of contact is sampled.
*/ */
@ -1122,7 +1114,7 @@ void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta)
stmpe811_notify(priv); stmpe811_notify(priv);
/* If we think that the pend is still down, the start/re-start the pen up /* If we think that the pen is still down, the start/re-start the pen up
* timer. * timer.
*/ */
@ -1141,4 +1133,3 @@ ignored:
} }
#endif /* CONFIG_INPUT && CONFIG_INPUT_STMPE811 && !CONFIG_STMPE811_TSC_DISABLE */ #endif /* CONFIG_INPUT && CONFIG_INPUT_STMPE811 && !CONFIG_STMPE811_TSC_DISABLE */

View File

@ -90,7 +90,6 @@
int work_signal(int qid) int work_signal(int qid)
{ {
pid_t pid; pid_t pid;
int wndx;
int ret; int ret;
/* Get the process ID of the worker thread */ /* Get the process ID of the worker thread */
@ -105,6 +104,7 @@ int work_signal(int qid)
#ifdef CONFIG_SCHED_LPWORK #ifdef CONFIG_SCHED_LPWORK
if (qid == LPWORK) if (qid == LPWORK)
{ {
int wndx;
int i; int i;
/* Find an IDLE worker thread */ /* Find an IDLE worker thread */