Changes to get PX4 config to build. Also some warning removal
This commit is contained in:
parent
af14026800
commit
10d4657d15
@ -97,7 +97,7 @@ static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER;
|
||||
|
||||
int create_ramdisk(void)
|
||||
{
|
||||
char *pbuffer;
|
||||
FAR char *pbuffer;
|
||||
int ret;
|
||||
|
||||
/* Allocate a buffer to hold the file system image. */
|
||||
@ -113,10 +113,10 @@ int create_ramdisk(void)
|
||||
/* Register a RAMDISK device to manage this RAM image */
|
||||
|
||||
ret = ramdisk_register(CONFIG_EXAMPLES_MOUNT_RAMDEVNO,
|
||||
pbuffer,
|
||||
CONFIG_EXAMPLES_MOUNT_NSECTORS,
|
||||
CONFIG_EXAMPLES_MOUNT_SECTORSIZE,
|
||||
true);
|
||||
(FAR uint8_t *)pbuffer,
|
||||
CONFIG_EXAMPLES_MOUNT_NSECTORS,
|
||||
CONFIG_EXAMPLES_MOUNT_SECTORSIZE,
|
||||
true);
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("create_ramdisk: Failed to register ramdisk at %s: %d\n",
|
||||
|
@ -119,14 +119,14 @@ static void dumptrace(void)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: dumptrace
|
||||
* Name: usbterm_listener
|
||||
*
|
||||
* Description:
|
||||
* Entry point for the listener thread.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR void *usbterm_listener(FAR void *parameter)
|
||||
static FAR void *usbterm_listener(FAR void *parameter)
|
||||
{
|
||||
message("usbterm_listener: Waiting for remote input\n");
|
||||
for (;;)
|
||||
|
@ -411,9 +411,9 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
#ifndef CONFIG_NSH_DISABLE_HELP
|
||||
static inline void help_cmdlist(FAR struct nsh_vtbl_s *vtbl)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
unsigned int k;
|
||||
|
||||
/* Print the command name in NUM_CMD_ROWS rows with CMDS_PER_LINE commands
|
||||
* on each line.
|
||||
|
@ -89,7 +89,7 @@ struct dbgmem_s
|
||||
* Name: mem_parse
|
||||
****************************************************************************/
|
||||
|
||||
int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
|
||||
static int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
|
||||
struct dbgmem_s *mem)
|
||||
{
|
||||
char *pcvalue = strchr(argv[1], '=');
|
||||
@ -148,8 +148,8 @@ int cmd_mb(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
struct dbgmem_s mem;
|
||||
volatile uint8_t *ptr;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ret = mem_parse(vtbl, argc, argv, &mem);
|
||||
if (ret == 0)
|
||||
@ -202,15 +202,17 @@ int cmd_mh(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
struct dbgmem_s mem;
|
||||
volatile uint16_t *ptr;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ret = mem_parse(vtbl, argc, argv, &mem);
|
||||
if (ret == 0)
|
||||
{
|
||||
/* Loop for the number of requested bytes */
|
||||
|
||||
for (i = 0, ptr = (volatile uint16_t*)mem.dm_addr; i < mem.dm_count; i += 2, ptr++)
|
||||
for (i = 0, ptr = (volatile uint16_t*)mem.dm_addr;
|
||||
i < mem.dm_count;
|
||||
i += 2, ptr++)
|
||||
{
|
||||
/* Print the value at the address */
|
||||
|
||||
@ -256,8 +258,8 @@ int cmd_mw(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
struct dbgmem_s mem;
|
||||
volatile uint32_t *ptr;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ret = mem_parse(vtbl, argc, argv, &mem);
|
||||
if (ret == 0)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* apps/nshlib/nsh_fscmds.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -1491,7 +1491,7 @@ int cmd_cmp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
|
||||
/* A partial read indicates the end of file (usually) */
|
||||
|
||||
if (nbytesread1 < sizeof(buf1))
|
||||
if (nbytesread1 < (size_t)sizeof(buf1))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -1516,3 +1516,4 @@ errout:
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* apps/nshlib/nsh_init.c
|
||||
*
|
||||
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -39,6 +39,8 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <apps/nsh.h>
|
||||
|
||||
#include "nsh.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user