Browse Source

Linux: Minor fixes of error caught by gcc-4.9.1

- Missing static declarations for functions not used outside a file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
sbg
Mark Charlebois 10 years ago
parent
commit
99399115f2
  1. 1
      src/drivers/ms5611/ms5611_linux.cpp
  2. 2
      src/platforms/linux/main.cpp
  3. 4
      src/platforms/linux/vcdev_test/vcdevtest_example.cpp
  4. 3
      src/platforms/px4_config.h
  5. 12
      src/platforms/px4_defines.h

1
src/drivers/ms5611/ms5611_linux.cpp

@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
*/
#include <px4_config.h>
#include <px4_defines.h>
#include <sys/types.h>
#include <stdint.h>

2
src/platforms/linux/main.cpp

@ -72,7 +72,7 @@ void run_cmd(const vector<string> &appargs) { @@ -72,7 +72,7 @@ void run_cmd(const vector<string> &appargs) {
}
}
void process_line(string &line)
static void process_line(string &line)
{
vector<string> appargs(5);

4
src/platforms/linux/vcdev_test/vcdevtest_example.cpp

@ -51,7 +51,7 @@ using namespace device; @@ -51,7 +51,7 @@ using namespace device;
#define TESTDEV "/dev/vdevex"
int writer_main(int argc, char *argv[])
static int writer_main(int argc, char *argv[])
{
char buf[1] = { '1' };
@ -97,7 +97,7 @@ VCDevExample::~VCDevExample() { @@ -97,7 +97,7 @@ VCDevExample::~VCDevExample() {
}
}
int test_pub_block(int fd, unsigned long blocked)
static int test_pub_block(int fd, unsigned long blocked)
{
int ret = px4_ioctl(fd, PX4_DEVIOCSPUBBLOCK, blocked);
if (ret < 0) {

3
src/platforms/px4_config.h

@ -45,9 +45,6 @@ @@ -45,9 +45,6 @@
#elif defined (__PX4_LINUX)
#define CONFIG_NFILE_STREAMS 1
extern long PX4_TICKS_PER_SEC;
#define USEC2TICKS(x) (PX4_TICKS_PER_SEC*(long)x/1000000L)
#define px4_errx(x, ...) errx(x, __VA_ARGS__)
#endif

12
src/platforms/px4_defines.h

@ -112,10 +112,16 @@ typedef param_t px4_param_t; @@ -112,10 +112,16 @@ typedef param_t px4_param_t;
#define _PX4_IOC(x,y) _IO(x,y)
/* FIXME - Used to satisfy build */
#define UNIQUE_ID 0x1FFF7A10 //STM DocID018909 Rev 8 Sect 39.1 (Unique device ID Register)
#define USEC2TICK(x) 0
//STM DocID018909 Rev 8 Sect 39.1 (Unique device ID Register)
#define UNIQUE_ID 0x1FFF7A10
#define getreg32(a) (*(volatile uint32_t *)(a))
#define getreg32(a) (*(volatile uint32_t *)(a))
__BEGIN_DECLS
extern long PX4_TICKS_PER_SEC;
__END_DECLS
#define USEC2TICK(x) (PX4_TICKS_PER_SEC*(long)x/1000000L)
#endif

Loading…
Cancel
Save