GCC fixes for warnings

GCC was more picky about prototypes for inlines being required.

The generate_listener.py script used incorrect printf formats and
was casting %f params to float, but printf casts all %f params to
double per the spec.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-05-06 11:45:23 -07:00
parent 5299f76706
commit 872e1ebda0
5 changed files with 18 additions and 13 deletions
@@ -788,7 +788,8 @@ tone_alarm_main(int argc, char *argv[])
PX4_WARN("not enough memory memory");
return 1;
}
fread(buffer, sz, 1, fd);
// FIXME - Make GCC happy
if (fread(buffer, sz, 1, fd)) { }
/* terminate the string */
buffer[sz] = 0;
ret = play_string(buffer, true);
@@ -37,12 +37,14 @@
#pragma once
extern sem_t _work_lock[];
inline void work_lock(int id);
inline void work_lock(int id)
{
//printf("work_lock %d\n", id);
sem_wait(&_work_lock[id]);
}
inline void work_unlock(int id);
inline void work_unlock(int id)
{
//printf("work_unlock %d\n", id);