diff --git a/cpr.c b/cpr.c index f2e35c5..c2e14ff 100644 --- a/cpr.c +++ b/cpr.c @@ -47,6 +47,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include "cpr.h" + #include #include diff --git a/dump1090.c b/dump1090.c index 2506e8c..e45c370 100644 --- a/dump1090.c +++ b/dump1090.c @@ -102,7 +102,7 @@ void receiverPositionChanged(float lat, float lon, float alt) // // =============================== Initialization =========================== // -void modesInitConfig(void) { +static void modesInitConfig(void) { // Default everything to zero/NULL memset(&Modes, 0, sizeof(Modes)); @@ -127,7 +127,7 @@ void modesInitConfig(void) { // //========================================================================= // -void modesInit(void) { +static void modesInit(void) { int i; pthread_mutex_init(&Modes.data_mutex,NULL); @@ -216,7 +216,7 @@ void modesInit(void) { // without caring about data acquisition // -void *readerThreadEntryPoint(void *arg) +static void *readerThreadEntryPoint(void *arg) { MODES_NOTUSED(arg); @@ -237,7 +237,7 @@ void *readerThreadEntryPoint(void *arg) // Get raw IQ samples and filter everything is < than the specified level // for more than 256 samples in order to reduce example file size // -void snipMode(int level) { +static void snipMode(int level) { int i, q; uint64_t c = 0; @@ -255,7 +255,7 @@ void snipMode(int level) { // // ================================ Main ==================================== // -void showHelp(void) { +static void showHelp(void) { printf("-----------------------------------------------------------------------------\n"); printf("| dump1090 ModeS Receiver %45s |\n", MODES_DUMP1090_VARIANT " " MODES_DUMP1090_VERSION); @@ -354,7 +354,7 @@ static void display_total_stats(void) // perform tasks we need to do continuously, like accepting new clients // from the net, refreshing the screen in interactive mode, and so forth // -void backgroundTasks(void) { +static void backgroundTasks(void) { static uint64_t next_stats_display; static uint64_t next_stats_update; static uint64_t next_json, next_history; diff --git a/net_io.c b/net_io.c index 6375f01..1de5851 100644 --- a/net_io.c +++ b/net_io.c @@ -790,7 +790,7 @@ void modesQueueOutput(struct modesMessage *mm, struct aircraft *a) { } // Decode a little-endian IEEE754 float (binary32) -float ieee754_binary32_le_to_float(uint8_t *data) +static float ieee754_binary32_le_to_float(uint8_t *data) { double sign = (data[3] & 0x80) ? -1.0 : 1.0; int16_t raw_exponent = ((data[3] & 0x7f) << 1) | ((data[2] & 0x80) >> 7); diff --git a/sdr_rtlsdr.c b/sdr_rtlsdr.c index f2fc30b..b0299ce 100644 --- a/sdr_rtlsdr.c +++ b/sdr_rtlsdr.c @@ -267,7 +267,7 @@ bool rtlsdrOpen(void) { static struct timespec rtlsdr_thread_cpu; -void rtlsdrCallback(unsigned char *buf, uint32_t len, void *ctx) { +static void rtlsdrCallback(unsigned char *buf, uint32_t len, void *ctx) { struct mag_buf *outbuf; struct mag_buf *lastbuf; uint32_t slen; diff --git a/track.c b/track.c index e1bae95..d18b11d 100644 --- a/track.c +++ b/track.c @@ -61,7 +61,7 @@ uint32_t modeAC_age[4096]; // Return a new aircraft structure for the linked list of tracked // aircraft // -struct aircraft *trackCreateAircraft(struct modesMessage *mm) { +static struct aircraft *trackCreateAircraft(struct modesMessage *mm) { static struct aircraft zeroAircraft; struct aircraft *a = (struct aircraft *) malloc(sizeof(*a)); int i; @@ -142,7 +142,7 @@ struct aircraft *trackCreateAircraft(struct modesMessage *mm) { // Return the aircraft with the specified address, or NULL if no aircraft // exists with this address. // -struct aircraft *trackFindAircraft(uint32_t addr) { +static struct aircraft *trackFindAircraft(uint32_t addr) { struct aircraft *a = Modes.aircrafts; while(a) { diff --git a/view1090.c b/view1090.c index ae925f5..33f9a63 100644 --- a/view1090.c +++ b/view1090.c @@ -31,7 +31,7 @@ // // ============================= Utility functions ========================== // -void sigintHandler(int dummy) { +static void sigintHandler(int dummy) { MODES_NOTUSED(dummy); signal(SIGINT, SIG_DFL); // reset signal handler - bit extra safety Modes.exit = 1; // Signal to threads that we are done @@ -48,7 +48,7 @@ void receiverPositionChanged(float lat, float lon, float alt) // // =============================== Initialization =========================== // -void view1090InitConfig(void) { +static void view1090InitConfig(void) { // Default everything to zero/NULL memset(&Modes, 0, sizeof(Modes)); @@ -61,7 +61,7 @@ void view1090InitConfig(void) { // //========================================================================= // -void view1090Init(void) { +static void view1090Init(void) { pthread_mutex_init(&Modes.data_mutex,NULL); pthread_cond_init(&Modes.data_cond,NULL); @@ -105,7 +105,7 @@ void view1090Init(void) { // // ================================ Main ==================================== // -void showHelp(void) { +static void showHelp(void) { printf( "-----------------------------------------------------------------------------\n" "| view1090 ModeS Viewer %45s |\n" @@ -129,7 +129,7 @@ void showHelp(void) { ); } -void sendSettings(struct client *c) +static void sendSettings(struct client *c) { sendBeastSettings(c, "CdV"); // Beast binary format, no filters, verbatim mode on sendBeastSettings(c, Modes.mode_ac ? "J" : "j"); // Mode A/C on or off