mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 12:23:34 +08:00
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>
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user