Fix more issues detected by CppCheck tool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3264 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
7d12e1fd04
commit
78d6af1190
@ -1435,3 +1435,5 @@
|
|||||||
class driver.
|
class driver.
|
||||||
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
|
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
|
||||||
USB host HID keyboard class driver test for the LPC17xx.
|
USB host HID keyboard class driver test for the LPC17xx.
|
||||||
|
* Ran the tool CppCheck (http://sourceforge.net/apps/mediawiki/cppcheck) and
|
||||||
|
fixed several errors in the code identified by the tool.
|
@ -8,7 +8,7 @@
|
|||||||
<tr align="center" bgcolor="#e4e4e4">
|
<tr align="center" bgcolor="#e4e4e4">
|
||||||
<td>
|
<td>
|
||||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||||
<p>Last Updated: January 18, 2011</p>
|
<p>Last Updated: January 19, 2011</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -2116,6 +2116,8 @@ nuttx-5.17 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
|||||||
class driver.
|
class driver.
|
||||||
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
|
* configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the
|
||||||
USB host HID keyboard class driver test for the LPC17xx.
|
USB host HID keyboard class driver test for the LPC17xx.
|
||||||
|
* Ran the tool CppCheck (http://sourceforge.net/apps/mediawiki/cppcheck) and
|
||||||
|
fixed several errors in the code identified by the tool.
|
||||||
|
|
||||||
pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
|
|||||||
|
|
||||||
static inline int usbhost_devinit(FAR struct usbhost_state_s *priv)
|
static inline int usbhost_devinit(FAR struct usbhost_state_s *priv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret = OK;
|
||||||
|
|
||||||
/* Set aside a transfer buffer for exclusive use by the class driver */
|
/* Set aside a transfer buffer for exclusive use by the class driver */
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* sched/mq_initialize.c
|
* sched/mq_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -210,8 +210,8 @@ void mq_initialize(void)
|
|||||||
* Function: mq_desblockalloc
|
* Function: mq_desblockalloc
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Allocate a block of message descriptors and place them
|
* Allocate a block of message descriptors and place them on the free
|
||||||
* on the free list.
|
* list.
|
||||||
*
|
*
|
||||||
* Inputs:
|
* Inputs:
|
||||||
* None
|
* None
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* sched/pthread_mutexinit.c
|
* sched/pthread_mutexinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -124,14 +124,14 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr
|
|||||||
{
|
{
|
||||||
ret = EINVAL;
|
ret = EINVAL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Set up attributes unique to the mutex type */
|
/* Set up attributes unique to the mutex type */
|
||||||
|
|
||||||
#ifdef CONFIG_MUTEX_TYPES
|
#ifdef CONFIG_MUTEX_TYPES
|
||||||
mutex->type = type;
|
mutex->type = type;
|
||||||
mutex->nlocks = 0;
|
mutex->nlocks = 0;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
sdbg("Returning %d\n", ret);
|
sdbg("Returning %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user