Changes to get PX4 config to build. Also some warning removal

This commit is contained in:
Gregory Nutt
2014-01-14 13:30:22 -06:00
parent a4e3fabee6
commit 803cdfdaf1
39 changed files with 749 additions and 649 deletions
+5 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* libc/misc/lib_dumpbuffer.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 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
@@ -77,7 +77,9 @@
void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, unsigned int buflen)
{
int i, j, k;
unsigned int i;
unsigned int j;
unsigned int k;
message("%s (%p):\n", msg, buffer);
for (i = 0; i < buflen; i += 32)
@@ -124,6 +126,7 @@ void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, unsigned int
}
}
}
message("\n");
}
}
-2
View File
@@ -97,5 +97,3 @@ size_t fread(FAR void *ptr, size_t size, size_t n_items, FAR FILE *stream)
}
return items_read;
}
+3 -1
View File
@@ -47,6 +47,8 @@
#include <assert.h>
#include <debug.h>
#include "lib_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -142,7 +144,7 @@ static void consume_eol(FILE *stream, bool consume)
FAR char *lib_fgets(FAR char *buf, size_t buflen, FILE *stream,
bool keepnl, bool consume)
{
int nch = 0;
size_t nch = 0;
/* Sanity checks */
+1 -1
View File
@@ -204,7 +204,7 @@ ssize_t lib_fread(FAR void *ptr, size_t count, FAR FILE *stream)
/* Were all of the requested bytes read? */
if (bytes_read < count)
if ((size_t)bytes_read < count)
{
/* No. We must be at the end of file. */
+1
View File
@@ -44,6 +44,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
+1 -1
View File
@@ -83,7 +83,7 @@ static void stdoutstream_putc(FAR struct lib_outstream_s *this, int ch)
****************************************************************************/
#if defined(CONFIG_STDIO_LINEBUFFER) && CONFIG_STDIO_BUFFER_SIZE > 0
int stdoutstream_flush(FAR struct lib_outstream_s *this)
static int stdoutstream_flush(FAR struct lib_outstream_s *this)
{
FAR struct lib_stdoutstream_s *sthis = (FAR struct lib_stdoutstream_s *)this;
return lib_fflush(sthis->stream, true);