diff --git a/ChangeLog b/ChangeLog index 4f838a08e8c..a00a7e9f214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1435,3 +1435,5 @@ class driver. * configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the 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. \ No newline at end of file diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 192f9b79ccc..692752ae842 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: January 18, 2011

+

Last Updated: January 19, 2011

@@ -2116,6 +2116,8 @@ nuttx-5.17 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> class driver. * configs/olimex-lpc1766stk/hidkbd - Added a configuration to build the 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> diff --git a/drivers/usbhost/usbhost_skeleton.c b/drivers/usbhost/usbhost_skeleton.c index 81fbf5e7abb..efb7a58baf6 100644 --- a/drivers/usbhost/usbhost_skeleton.c +++ b/drivers/usbhost/usbhost_skeleton.c @@ -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) { - int ret; + int ret = OK; /* Set aside a transfer buffer for exclusive use by the class driver */ diff --git a/sched/mq_initialize.c b/sched/mq_initialize.c index 2fcd304dd25..2e85e148c9b 100644 --- a/sched/mq_initialize.c +++ b/sched/mq_initialize.c @@ -1,7 +1,7 @@ /************************************************************************ * 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 * * Redistribution and use in source and binary forms, with or without @@ -210,8 +210,8 @@ void mq_initialize(void) * Function: mq_desblockalloc * * Description: - * Allocate a block of message descriptors and place them - * on the free list. + * Allocate a block of message descriptors and place them on the free + * list. * * Inputs: * None diff --git a/sched/pthread_mutexinit.c b/sched/pthread_mutexinit.c index 60a095caf72..6004076cb8c 100644 --- a/sched/pthread_mutexinit.c +++ b/sched/pthread_mutexinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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; } - } - /* Set up attributes unique to the mutex type */ + /* Set up attributes unique to the mutex type */ #ifdef CONFIG_MUTEX_TYPES - mutex->type = type; - mutex->nlocks = 0; + mutex->type = type; + mutex->nlocks = 0; #endif + } sdbg("Returning %d\n", ret); return ret;