mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Fixes for warnings from Freddie Chopin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5294 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
f5776dec9f
commit
d7aefb08f7
@ -48,6 +48,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/pwm.h>
|
||||
|
||||
|
||||
@ -508,7 +508,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
}
|
||||
break;
|
||||
|
||||
/* The R3 response is 5 bytes long */
|
||||
/* The R3 response is 5 bytes long. The first byte is identical to R1. */
|
||||
|
||||
case MMCSD_CMDRESP_R3:
|
||||
{
|
||||
@ -520,8 +520,10 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
fvdbg("CMD%d[%08x] R1=%02x OCR=%08x\n",
|
||||
cmd->cmd & 0x3f, arg, response, slot->ocr);
|
||||
}
|
||||
break;
|
||||
|
||||
/* The R7 response is 5 bytes long. The first byte is identical to R1. */
|
||||
|
||||
/* The R7 response is 5 bytes long */
|
||||
case MMCSD_CMDRESP_R7:
|
||||
default:
|
||||
{
|
||||
|
||||
@ -113,7 +113,6 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
|
||||
FAR msgq_t *msgq;
|
||||
mqd_t mqdes = NULL;
|
||||
va_list arg; /* Points to each un-named argument */
|
||||
mode_t mode; /* MQ creation mode parameter (ignored) */
|
||||
struct mq_attr *attr; /* MQ creation attributes */
|
||||
int namelen; /* Length of MQ name */
|
||||
|
||||
@ -170,7 +169,7 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
|
||||
*/
|
||||
|
||||
va_start(arg, oflags);
|
||||
mode = va_arg(arg, mode_t);
|
||||
(void)va_arg(arg, mode_t); /* MQ creation mode parameter (ignored) */
|
||||
attr = va_arg(arg, struct mq_attr*);
|
||||
|
||||
/* Initialize the new named message queue */
|
||||
|
||||
@ -120,7 +120,6 @@ FAR sem_t *sem_open (FAR const char *name, int oflag, ...)
|
||||
FAR nsem_t *psem;
|
||||
FAR sem_t *sem = (FAR sem_t*)ERROR;
|
||||
va_list arg; /* Points to each un-named argument */
|
||||
mode_t mode; /* Creation mode parameter (ignored) */
|
||||
unsigned int value; /* Semaphore value parameter */
|
||||
|
||||
/* Make sure that a non-NULL name is supplied */
|
||||
@ -165,7 +164,7 @@ FAR sem_t *sem_open (FAR const char *name, int oflag, ...)
|
||||
*/
|
||||
|
||||
va_start(arg, oflag);
|
||||
mode = va_arg(arg, mode_t);
|
||||
(void)va_arg(arg, mode_t); /* Creation mode parameter (ignored) */
|
||||
value = va_arg(arg, unsigned int);
|
||||
|
||||
/* Verify that a legal initial value was selected. */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user