aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/amps/Makefile.am2
-rw-r--r--src/amps/amps.c4
-rw-r--r--src/amps/amps.h1
-rw-r--r--src/amps/jtacs_tones.c1
-rw-r--r--src/amps/tacs_outoforder.c1
-rw-r--r--src/amps/tacs_tones.c1
-rw-r--r--src/amps/usa_congestion.c1
-rw-r--r--src/amps/usa_invalidnumber.c1
-rw-r--r--src/amps/usa_noanswer.c1
-rw-r--r--src/amps/usa_outoforder.c1
-rw-r--r--src/amps/usa_tones.c1
-rw-r--r--src/anetz/Makefile.am2
-rw-r--r--src/anetz/anetz.c4
-rw-r--r--src/anetz/besetztton.c1
-rw-r--r--src/anetz/dsp.c2
-rw-r--r--src/anetz/freiton.c1
-rw-r--r--src/anetz/stations.c5
-rw-r--r--src/bnetz/Makefile.am2
-rw-r--r--src/bnetz/bnetz.c4
-rw-r--r--src/bnetz/dialer.c3
-rw-r--r--src/bnetz/dsp.c2
-rw-r--r--src/bnetz/stations.c5
-rw-r--r--src/cnetz/Makefile.am2
-rw-r--r--src/cnetz/cnetz.c4
-rw-r--r--src/cnetz/dsp.c2
-rw-r--r--src/datenklo/Makefile.am3
-rw-r--r--src/datenklo/am791x.c4
-rw-r--r--src/datenklo/datenklo.c2
-rw-r--r--src/datenklo/main.c8
-rw-r--r--src/dcf77/Makefile.am2
-rw-r--r--src/dcf77/dcf77.c4
-rwxr-xr-xsrc/dcf77/main.c14
-rw-r--r--src/eurosignal/Makefile.am2
-rw-r--r--src/eurosignal/es_ges.c1
-rw-r--r--src/eurosignal/es_kaudn.c1
-rw-r--r--src/eurosignal/es_mitte.c1
-rw-r--r--src/eurosignal/es_teilges.c1
-rw-r--r--src/fuenf/Makefile.am2
-rw-r--r--src/fuenf/fuenf.c2
-rw-r--r--src/fuvst/Makefile.am2
-rwxr-xr-xsrc/fuvst/fuvst.c16
-rwxr-xr-xsrc/fuvst/mup.c2
-rw-r--r--src/fuvst/sniffer.c2
-rw-r--r--src/golay/Makefile.am2
-rw-r--r--src/imts/Makefile.am2
-rw-r--r--src/imts/dialer.c3
-rw-r--r--src/imts/dsp.c2
-rw-r--r--src/imts/imts.c2
-rw-r--r--src/jolly/Makefile.am2
-rw-r--r--src/jolly/jolly.c4
-rw-r--r--src/libaaimage/Makefile.am2
-rw-r--r--src/libam/Makefile.am2
-rw-r--r--src/libclipper/Makefile.am2
-rw-r--r--src/libcompandor/Makefile.am2
-rw-r--r--src/libdisplay/Makefile.am2
-rw-r--r--src/libdtmf/Makefile.am2
-rw-r--r--src/libemphasis/Makefile.am2
-rw-r--r--src/libfft/Makefile.am2
-rw-r--r--src/libfilter/Makefile.am2
-rw-r--r--src/libfm/Makefile.am2
-rw-r--r--src/libfsk/Makefile.am2
-rw-r--r--src/libgoertzel/Makefile.am2
-rw-r--r--src/libhagelbarger/Makefile.am2
-rw-r--r--src/libhagelbarger/hagelbarger.c3
-rw-r--r--src/libimage/Makefile.am3
-rw-r--r--src/libjitter/Makefile.am2
-rw-r--r--src/liblogging/Makefile.am2
-rw-r--r--src/libmobile/Makefile.am2
-rw-r--r--src/libmobile/call.c2
-rw-r--r--src/libmobile/call.h6
-rwxr-xr-xsrc/libmobile/console.c3
-rw-r--r--src/libmobile/main_mobile.c2
-rw-r--r--src/libmobile/main_mobile.h4
-rw-r--r--src/libmobile/testton.c1
-rw-r--r--src/libmtp/Makefile.am2
-rw-r--r--src/liboptions/Makefile.am2
-rw-r--r--src/libsample/Makefile.am2
-rw-r--r--src/libsamplerate/Makefile.am2
-rw-r--r--src/libscrambler/Makefile.am2
-rw-r--r--src/libsdr/Makefile.am3
-rw-r--r--src/libsendevolumenregler/Makefile.am2
-rw-r--r--src/libserial/Makefile.am2
-rw-r--r--src/libsound/Makefile.am2
-rw-r--r--src/libsound/sound.h2
-rw-r--r--src/libsquelch/Makefile.am2
-rw-r--r--src/libv27/Makefile.am2
-rw-r--r--src/libwave/Makefile.am2
-rw-r--r--src/magnetic/Makefile.am2
-rw-r--r--src/magnetic/main.c11
-rw-r--r--src/mate/Makefile.am2
-rw-r--r--src/mate/matesimulator.c3
-rw-r--r--src/mpt1327/Makefile.am2
-rw-r--r--src/mpt1327/dsp.c2
-rwxr-xr-xsrc/mpt1327/mpt1327.c24
-rw-r--r--src/nmt/Makefile.am2
-rw-r--r--src/nmt/dms.c4
-rw-r--r--src/nmt/dsp.c2
-rw-r--r--src/nmt/frame.c2
-rw-r--r--src/nmt/nmt.c8
-rw-r--r--src/nmt/tones.c1
-rw-r--r--src/pocsag/Makefile.am2
-rw-r--r--src/pocsag/pocsag.c2
-rw-r--r--src/r2000/Makefile.am2
-rw-r--r--src/r2000/dsp.c2
-rw-r--r--src/r2000/frame.c6
-rw-r--r--src/r2000/r2000.c8
-rw-r--r--src/r2000/tones.c1
-rw-r--r--src/radio/Makefile.am2
-rw-r--r--src/radio/main.c8
-rw-r--r--src/sim/Makefile.am2
-rw-r--r--src/sim/main.c13
-rw-r--r--src/sim/sim.c4
-rw-r--r--src/sim/sim.h3
-rw-r--r--src/test/Makefile.am2
-rw-r--r--src/test/dummy.c9
-rw-r--r--src/test/test_dms.c10
-rw-r--r--src/test/test_dtmf.c2
-rw-r--r--src/test/test_sms.c18
-rw-r--r--src/tv/Makefile.am3
-rw-r--r--src/tv/channels.c1
-rw-r--r--src/tv/main.c8
-rw-r--r--src/zeitansage/Makefile.am2
-rw-r--r--src/zeitansage/samples.c1
123 files changed, 231 insertions, 168 deletions
diff --git a/src/amps/Makefile.am b/src/amps/Makefile.am
index 475d733..a3686b0 100644
--- a/src/amps/Makefile.am
+++ b/src/amps/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
amps tacs jtacs
diff --git a/src/amps/amps.c b/src/amps/amps.c
index e3a27e3..ad2881d 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -342,7 +342,7 @@ const char *amps_scm(uint8_t scm)
return text;
}
-const char *amps_mpci(uint8_t mpci)
+static const char *amps_mpci(uint8_t mpci)
{
switch (mpci) {
case 0:
@@ -359,7 +359,7 @@ const char *amps_mpci(uint8_t mpci)
}
-const char *amps_state_name(enum amps_state state)
+static const char *amps_state_name(enum amps_state state)
{
static char invalid[16];
diff --git a/src/amps/amps.h b/src/amps/amps.h
index c74be61..da0e660 100644
--- a/src/amps/amps.h
+++ b/src/amps/amps.h
@@ -171,6 +171,7 @@ struct amps {
int when_count; /* counter of the filler frame */
};
+void amps_display_status(void);
void amps_channel_list(void);
int amps_channel_by_short_name(const char *short_name);
const char *chan_type_short_name(enum amps_chan_type chan_type);
diff --git a/src/amps/jtacs_tones.c b/src/amps/jtacs_tones.c
index 1530b57..e54918a 100644
--- a/src/amps/jtacs_tones.c
+++ b/src/amps/jtacs_tones.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "tones.h"
static int16_t pattern_ringback[1000] = {
0x00e5, 0x0070, 0x001c, 0x0001, 0x001c, 0x0070, 0x00e5, 0x0168,
diff --git a/src/amps/tacs_outoforder.c b/src/amps/tacs_outoforder.c
index ab2009a..e217b24 100644
--- a/src/amps/tacs_outoforder.c
+++ b/src/amps/tacs_outoforder.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "outoforder.h"
static int16_t pattern[] = {
0x0000, 0x0000, 0xffff, 0x0002, 0xfffe, 0x0003, 0xfffd, 0x0001,
diff --git a/src/amps/tacs_tones.c b/src/amps/tacs_tones.c
index 577dad7..8c1815f 100644
--- a/src/amps/tacs_tones.c
+++ b/src/amps/tacs_tones.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "tones.h"
static int16_t pattern_ringback[] = {
0x000b, 0x0008, 0x000d, 0x000e, 0x000d, 0x0012, 0x0011, 0xffcd,
diff --git a/src/amps/usa_congestion.c b/src/amps/usa_congestion.c
index ed1b87b..cc9e5fa 100644
--- a/src/amps/usa_congestion.c
+++ b/src/amps/usa_congestion.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "congestion.h"
static int16_t pattern[] = {
0xfffd, 0x0004, 0xfffb, 0x0004, 0xfffe, 0x0001, 0x0001, 0xfffe,
diff --git a/src/amps/usa_invalidnumber.c b/src/amps/usa_invalidnumber.c
index a272f7c..e470a90 100644
--- a/src/amps/usa_invalidnumber.c
+++ b/src/amps/usa_invalidnumber.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "invalidnumber.h"
static int16_t pattern[] = {
0xfffe, 0x0001, 0xffff, 0x0001, 0xffff, 0x0002, 0xfffe, 0x0002,
diff --git a/src/amps/usa_noanswer.c b/src/amps/usa_noanswer.c
index 5bddcb6..06ef7ba 100644
--- a/src/amps/usa_noanswer.c
+++ b/src/amps/usa_noanswer.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "noanswer.h"
static int16_t pattern[] = {
0xfe24, 0xfd20, 0xfd2c, 0xfdb5, 0xfeba, 0xfe20, 0xfd41, 0xfe32,
diff --git a/src/amps/usa_outoforder.c b/src/amps/usa_outoforder.c
index de5947c..ec15a29 100644
--- a/src/amps/usa_outoforder.c
+++ b/src/amps/usa_outoforder.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "outoforder.h"
static int16_t pattern[] = {
0xfeae, 0xfde4, 0xfe26, 0xfea7, 0xfe94, 0xfe8a, 0xfeb4, 0xfe3b,
diff --git a/src/amps/usa_tones.c b/src/amps/usa_tones.c
index b919775..3b60226 100644
--- a/src/amps/usa_tones.c
+++ b/src/amps/usa_tones.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "tones.h"
static int16_t pattern_ringback[] = {
0x0070, 0x00dd, 0x013b, 0x0192, 0x0191, 0x0153, 0x0099, 0xffb2,
diff --git a/src/anetz/Makefile.am b/src/anetz/Makefile.am
index 8a4e1f3..2f3972e 100644
--- a/src/anetz/Makefile.am
+++ b/src/anetz/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
anetz
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index 65b5fdd..af3a741 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -37,7 +37,7 @@
#define PAGING_TO 30,0 /* Nach dieser Zeit ist der Operator genervt... */
#define RELEASE_TO 3,0 /* Release time, so station keeps blocked for a while */
-const char *anetz_state_name(enum anetz_state state)
+static const char *anetz_state_name(enum anetz_state state)
{
static char invalid[16];
@@ -58,7 +58,7 @@ const char *anetz_state_name(enum anetz_state state)
return invalid;
}
-void anetz_display_status(void)
+static void anetz_display_status(void)
{
sender_t *sender;
anetz_t *anetz;
diff --git a/src/anetz/besetztton.c b/src/anetz/besetztton.c
index 701e62a..4c5df68 100644
--- a/src/anetz/besetztton.c
+++ b/src/anetz/besetztton.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "besetztton.h"
static int16_t pattern[] = {
0x0004, 0xffe9, 0xffc9, 0xffac, 0xff92, 0xff83, 0xff75, 0xff56,
diff --git a/src/anetz/dsp.c b/src/anetz/dsp.c
index 6dad60e..06c5ac7 100644
--- a/src/anetz/dsp.c
+++ b/src/anetz/dsp.c
@@ -386,7 +386,7 @@ void sender_send(sender_t *sender, sample_t *samples, uint8_t *power, int length
}
}
-const char *anetz_dsp_mode_name(enum dsp_mode mode)
+static const char *anetz_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/anetz/freiton.c b/src/anetz/freiton.c
index 7964c3f..ec2e94d 100644
--- a/src/anetz/freiton.c
+++ b/src/anetz/freiton.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "freiton.h"
static int16_t pattern[] = {
0x0056, 0x0068, 0x0065, 0x005d, 0x0040, 0x0031, 0x001a, 0x000d,
diff --git a/src/anetz/stations.c b/src/anetz/stations.c
index 9908755..753f562 100644
--- a/src/anetz/stations.c
+++ b/src/anetz/stations.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include "stations.h"
static struct anetz_stations {
const char *standort;
@@ -147,7 +148,7 @@ static struct anetz_stations {
{ NULL, 0, 0, 0, 0, 0, NULL }
};
-double lat_from_coordinates(const char *string)
+static double lat_from_coordinates(const char *string)
{
if (strlen(string) != 11)
abort();
@@ -168,7 +169,7 @@ double lat_from_coordinates(const char *string)
(double)(string[4] - '0') / 60.0;
}
-double lon_from_coordinates(const char *string)
+static double lon_from_coordinates(const char *string)
{
if (strlen(string) != 11)
abort();
diff --git a/src/bnetz/Makefile.am b/src/bnetz/Makefile.am
index 8171a01..23e3083 100644
--- a/src/bnetz/Makefile.am
+++ b/src/bnetz/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
bnetz \
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index 7212e95..ca68508 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -51,7 +51,7 @@
#define METERING_DURATION_US 140000 /* duration of metering pulse (according to FTZ 1727 Pfl 32 Clause 3.2.6.6.1) */
#define METERING_START 1,0 /* start metering 1 second after call start */
-const char *bnetz_state_name(enum bnetz_state state)
+static const char *bnetz_state_name(enum bnetz_state state)
{
static char invalid[16];
@@ -80,7 +80,7 @@ const char *bnetz_state_name(enum bnetz_state state)
return invalid;
}
-void bnetz_display_status(void)
+static void bnetz_display_status(void)
{
sender_t *sender;
bnetz_t *bnetz;
diff --git a/src/bnetz/dialer.c b/src/bnetz/dialer.c
index 40783ad..0e12e6b 100644
--- a/src/bnetz/dialer.c
+++ b/src/bnetz/dialer.c
@@ -68,8 +68,11 @@ wave_rec_t wave_tx_rec;
/* dummy functions */
int num_kanal = 1; /* only one channel used for debugging */
+void *get_sender_by_empfangsfrequenz(void);
void *get_sender_by_empfangsfrequenz() { return NULL; }
+void display_measurements_add(void);
void display_measurements_add() {}
+void display_measurements_update(void);
void display_measurements_update() {}
#define OPT_METERING 1000
diff --git a/src/bnetz/dsp.c b/src/bnetz/dsp.c
index b1b57b4..9e0e3fe 100644
--- a/src/bnetz/dsp.c
+++ b/src/bnetz/dsp.c
@@ -396,7 +396,7 @@ again:
}
}
-const char *bnetz_dsp_mode_name(enum dsp_mode mode)
+static const char *bnetz_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/bnetz/stations.c b/src/bnetz/stations.c
index 96265e8..0d87c1e 100644
--- a/src/bnetz/stations.c
+++ b/src/bnetz/stations.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include "stations.h"
static struct bnetz_stations {
const char *standort;
@@ -221,7 +222,7 @@ static struct bnetz_stations {
{ NULL, 0, NULL }
};
-double lat_from_coordinates(const char *string)
+static double lat_from_coordinates(const char *string)
{
if (strlen(string) != 11)
abort();
@@ -242,7 +243,7 @@ double lat_from_coordinates(const char *string)
(double)(string[4] - '0') / 60.0;
}
-double lon_from_coordinates(const char *string)
+static double lon_from_coordinates(const char *string)
{
if (strlen(string) != 11)
abort();
diff --git a/src/cnetz/Makefile.am b/src/cnetz/Makefile.am
index 5b29c0b..fcf96da 100644
--- a/src/cnetz/Makefile.am
+++ b/src/cnetz/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
cnetz
diff --git a/src/cnetz/cnetz.c b/src/cnetz/cnetz.c
index f78773a..b3771d7 100644
--- a/src/cnetz/cnetz.c
+++ b/src/cnetz/cnetz.c
@@ -230,7 +230,7 @@ static uint8_t cnetz_power2bits(int power)
}
}
-const char *cnetz_state_name(enum cnetz_state state)
+static const char *cnetz_state_name(enum cnetz_state state)
{
static char invalid[16];
@@ -273,7 +273,7 @@ static void cnetz_new_state(cnetz_t *cnetz, enum cnetz_state new_state)
}
/* Convert ISDN cause to 'Ausloesegrund' of C-Netz mobile station */
-uint8_t cnetz_cause_isdn2cnetz(int cause)
+static uint8_t cnetz_cause_isdn2cnetz(int cause)
{
switch (cause) {
case CAUSE_NORMAL:
diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c
index 14659a5..af29c62 100644
--- a/src/cnetz/dsp.c
+++ b/src/cnetz/dsp.c
@@ -54,7 +54,7 @@ scrambler_t scrambler_test_scrambler1;
scrambler_t scrambler_test_scrambler2;
#endif
-const char *cnetz_dsp_mode_name(enum dsp_mode mode)
+static const char *cnetz_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/datenklo/Makefile.am b/src/datenklo/Makefile.am
index 1361c3d..10dd617 100644
--- a/src/datenklo/Makefile.am
+++ b/src/datenklo/Makefile.am
@@ -1,4 +1,5 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes) $(FUSE_CFLAGS)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes) \
+ $(FUSE_CFLAGS)
bin_PROGRAMS = \
datenklo
diff --git a/src/datenklo/am791x.c b/src/datenklo/am791x.c
index 5f3ee1a..103db51 100644
--- a/src/datenklo/am791x.c
+++ b/src/datenklo/am791x.c
@@ -300,13 +300,13 @@ void am791x_list_mc(enum am791x_type type)
}
/* init STO signal */
-void init_sto(am791x_t *am791x)
+static void init_sto(am791x_t *am791x)
{
am791x->sto_phaseshift65536 = 900 / (double)am791x->samplerate * 65536.0;
}
/* transmit STO signal, use phase from FSK modulator, to avoid phase jumps */
-int send_sto(am791x_t *am791x, sample_t *sample, int length)
+static int send_sto(am791x_t *am791x, sample_t *sample, int length)
{
fsk_mod_t *fsk = &am791x->fsk_tx;
int count = 0;
diff --git a/src/datenklo/datenklo.c b/src/datenklo/datenklo.c
index 21a789f..4576e67 100644
--- a/src/datenklo/datenklo.c
+++ b/src/datenklo/datenklo.c
@@ -1246,7 +1246,7 @@ static void dk_unlock(void)
}
/* signal handler to exit */
-void sighandler(int sigset)
+static void sighandler(int sigset)
{
if (sigset == SIGHUP)
return;
diff --git a/src/datenklo/main.c b/src/datenklo/main.c
index 5a3fb5e..92d322d 100644
--- a/src/datenklo/main.c
+++ b/src/datenklo/main.c
@@ -27,6 +27,7 @@
#include <math.h>
#include "../libsample/sample.h"
#include <osmocom/core/timer.h>
+#include <osmocom/cc/misc.h>
#include "../liboptions/options.h"
#include "../liblogging/logging.h"
#include "../libfsk/fsk.h"
@@ -49,6 +50,7 @@
/* dummy functions */
int num_kanal = 1; /* only one channel used for debugging */
+void *get_sender_by_empfangsfrequenz(void);
void *get_sender_by_empfangsfrequenz() { return "void"; }
static datenklo_t datenklo[MAX_DEVICES];
@@ -71,7 +73,7 @@ const char *write_rx_wave = NULL;
const char *read_tx_wave = NULL;
const char *read_rx_wave = NULL;
-void print_help(const char *arg0)
+static void print_help(const char *arg0)
{
printf("Usage: %s [options] -M <mode>\n\n", arg0);
/* - - */
@@ -235,7 +237,7 @@ static int handle_options(int short_option, int argi, char **argv)
return 1;
}
-const char *inc_dev_name(const char *dev_name)
+static const char *inc_dev_name(const char *dev_name)
{
char *new_name, *number;
int integer;
@@ -326,5 +328,5 @@ fail:
return 0;
}
-void osmo_cc_set_log_cat(void) {}
+void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
diff --git a/src/dcf77/Makefile.am b/src/dcf77/Makefile.am
index 5b7fa22..610b0de 100644
--- a/src/dcf77/Makefile.am
+++ b/src/dcf77/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
if HAVE_ALSA
bin_PROGRAMS = \
diff --git a/src/dcf77/dcf77.c b/src/dcf77/dcf77.c
index 3e7d9bb..52b5770 100644
--- a/src/dcf77/dcf77.c
+++ b/src/dcf77/dcf77.c
@@ -1131,8 +1131,9 @@ static void rx_frame(dcf77_rx_t *rx, uint64_t frame)
}
}
+#if 0
/* test routing for test data */
-void rx_frame_test(dcf77_t *dcf77, const char *string)
+static void rx_frame_test(dcf77_t *dcf77, const char *string)
{
uint64_t frame = 0;
int i;
@@ -1144,6 +1145,7 @@ void rx_frame_test(dcf77_t *dcf77, const char *string)
rx_frame(&dcf77->rx, frame);
}
+#endif
/* receive one symbol = one second */
static void rx_symbol(dcf77_t *dcf77, char symbol)
diff --git a/src/dcf77/main.c b/src/dcf77/main.c
index b99197c..156cb20 100755
--- a/src/dcf77/main.c
+++ b/src/dcf77/main.c
@@ -33,6 +33,7 @@
#include "../libsample/sample.h"
#include "../libsound/sound.h"
#include "../libaaimage/aaimage.h"
+#include <osmocom/cc/misc.h>
#include "dcf77.h"
#include "cities.h"
@@ -61,6 +62,7 @@ static int rt_prio = 0;
static int fast_math = 0;
/* not static, in case we add libtimer some day, then compiler hits an error */
+double get_time(void);
double get_time(void)
{
static struct timespec tv;
@@ -138,7 +140,7 @@ static void print_usage(const char *app)
printf("Usage: %s [-a hw:0,0] [<options>]\n", app);
}
-void print_help(void)
+static void print_help(void)
{
/* - - */
printf(" -h --help\n");
@@ -411,7 +413,7 @@ static int get_char()
return -1;
}
-int soundif_open(const char *audiodev, int samplerate, int buffer_size)
+static int soundif_open(const char *audiodev, int samplerate, int buffer_size)
{
enum sound_direction direction = SOUND_DIR_DUPLEX;
@@ -434,13 +436,13 @@ int soundif_open(const char *audiodev, int samplerate, int buffer_size)
return 0;
}
-void soundif_start(void)
+static void soundif_start(void)
{
sound_start(soundif);
LOGP(DDSP, LOGL_DEBUG, "Starting audio stream!\n");
}
-void soundif_close(void)
+static void soundif_close(void)
{
/* close audiodev */
if (soundif) {
@@ -449,7 +451,7 @@ void soundif_close(void)
}
}
-void soundif_work(int buffer_size)
+static void soundif_work(int buffer_size)
{
int count;
sample_t buff1[buffer_size], buff2[buffer_size], *samples[2] = { buff1, buff2 };
@@ -654,5 +656,5 @@ error:
return 0;
}
-void osmo_cc_set_log_cat(void) {}
+void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
diff --git a/src/eurosignal/Makefile.am b/src/eurosignal/Makefile.am
index d16abc0..aeb5dbb 100644
--- a/src/eurosignal/Makefile.am
+++ b/src/eurosignal/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
eurosignal
diff --git a/src/eurosignal/es_ges.c b/src/eurosignal/es_ges.c
index 7e3c58b..59ec760 100644
--- a/src/eurosignal/es_ges.c
+++ b/src/eurosignal/es_ges.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "es_ges.h"
static int16_t pattern[] = {
0x003f, 0xff8e, 0x0092, 0x0097, 0x001f, 0x0048, 0xffd9, 0xffdb,
diff --git a/src/eurosignal/es_kaudn.c b/src/eurosignal/es_kaudn.c
index e4cad88..6e376f5 100644
--- a/src/eurosignal/es_kaudn.c
+++ b/src/eurosignal/es_kaudn.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "es_kaudn.h"
static int16_t pattern[] = {
0x0022, 0x0014, 0xffde, 0xff85, 0xff24, 0xff00, 0xff2c, 0xff88,
diff --git a/src/eurosignal/es_mitte.c b/src/eurosignal/es_mitte.c
index d959002..0ea983a 100644
--- a/src/eurosignal/es_mitte.c
+++ b/src/eurosignal/es_mitte.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "es_mitte.h"
static int16_t pattern[] = {
0xff96, 0xffd4, 0x0020, 0x0073, 0x0084, 0x0061, 0x002f, 0xfffd,
diff --git a/src/eurosignal/es_teilges.c b/src/eurosignal/es_teilges.c
index eab20f1..a4e2296 100644
--- a/src/eurosignal/es_teilges.c
+++ b/src/eurosignal/es_teilges.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "es_teilges.h"
static int16_t pattern[] = {
0xffa4, 0xffae, 0xffc2, 0xff8a, 0xffb4, 0xfff0, 0xfffa, 0x0005,
diff --git a/src/fuenf/Makefile.am b/src/fuenf/Makefile.am
index 59f2f6e..964db02 100644
--- a/src/fuenf/Makefile.am
+++ b/src/fuenf/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
5-ton-folge
diff --git a/src/fuenf/fuenf.c b/src/fuenf/fuenf.c
index cd52c6d..4f8fa00 100644
--- a/src/fuenf/fuenf.c
+++ b/src/fuenf/fuenf.c
@@ -145,7 +145,7 @@ static void fuenf_display_status(void)
display_status_end();
}
-void fuenf_new_state(fuenf_t *fuenf, enum fuenf_state new_state)
+static void fuenf_new_state(fuenf_t *fuenf, enum fuenf_state new_state)
{
if (fuenf->state == new_state)
return;
diff --git a/src/fuvst/Makefile.am b/src/fuvst/Makefile.am
index 73a7708..983ea4e 100644
--- a/src/fuvst/Makefile.am
+++ b/src/fuvst/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
if HAVE_ALSA
bin_PROGRAMS = \
diff --git a/src/fuvst/fuvst.c b/src/fuvst/fuvst.c
index e5eda00..847876e 100755
--- a/src/fuvst/fuvst.c
+++ b/src/fuvst/fuvst.c
@@ -449,7 +449,7 @@ static const char *transaction2rufnummer(transaction_t *trans)
return nut2rufnummer(trans->futln_nat, trans->futln_fuvst, trans->futln_rest);
}
-const char *state_name(enum call_state state)
+static const char *state_name(enum call_state state)
{
static char invalid[16];
@@ -478,7 +478,7 @@ const char *state_name(enum call_state state)
return invalid;
}
-void display_status(void)
+static void display_status(void)
{
sender_t *sender;
fuvst_t *fuvst;
@@ -515,7 +515,7 @@ static void new_call_state(transaction_t *trans, enum call_state new_state)
display_status();
}
-transaction_t *search_transaction_number(uint8_t futln_nat, uint8_t futln_fuvst, uint16_t futln_rest)
+static transaction_t *search_transaction_number(uint8_t futln_nat, uint8_t futln_fuvst, uint16_t futln_rest)
{
transaction_t *trans = trans_list;
@@ -533,7 +533,7 @@ transaction_t *search_transaction_number(uint8_t futln_nat, uint8_t futln_fuvst,
return NULL;
}
-transaction_t *search_transaction_ident(uint8_t ident)
+static transaction_t *search_transaction_ident(uint8_t ident)
{
transaction_t *trans = trans_list;
@@ -549,7 +549,7 @@ transaction_t *search_transaction_ident(uint8_t ident)
return NULL;
}
-transaction_t *search_transaction_callref(int callref)
+static transaction_t *search_transaction_callref(int callref)
{
transaction_t *trans = trans_list;
@@ -601,7 +601,7 @@ static void destroy_transaction(transaction_t *trans)
}
/* Timeout handling */
-void trans_timeout(void *data)
+static void trans_timeout(void *data)
{
transaction_t *trans = data;
@@ -722,7 +722,7 @@ static fuvst_t *get_spk(uint8_t Q)
}
/* Convert 'Ausloesegrund' of C-Netz base station to ISDN cause */
-int cnetz_fufst2cause(uint8_t X)
+static int cnetz_fufst2cause(uint8_t X)
{
switch (X) {
case 0: /* undefiniert */
@@ -745,7 +745,7 @@ int cnetz_fufst2cause(uint8_t X)
}
/* Convert ISDN cause to 'Ausloesegrund' of C-Netz mobile station */
-uint8_t cnetz_cause2futln(int cause)
+static uint8_t cnetz_cause2futln(int cause)
{
switch (cause) {
case CAUSE_NORMAL:
diff --git a/src/fuvst/mup.c b/src/fuvst/mup.c
index bdfc428..24f0c9f 100755
--- a/src/fuvst/mup.c
+++ b/src/fuvst/mup.c
@@ -671,7 +671,7 @@ void decode_abaf(uint8_t *data, int len, uint16_t *T, uint8_t *U, uint8_t *N)
static char digit2char[16] = "0123456789a*#bcd";
/* MO call */
-void _decode_outgoing(uint8_t *data, int len, uint16_t *T, uint8_t *U, uint8_t *N, char *number)
+static void _decode_outgoing(uint8_t *data, int len, uint16_t *T, uint8_t *U, uint8_t *N, char *number)
{
int i;
diff --git a/src/fuvst/sniffer.c b/src/fuvst/sniffer.c
index fc1f442..dcac22d 100644
--- a/src/fuvst/sniffer.c
+++ b/src/fuvst/sniffer.c
@@ -155,7 +155,7 @@ static void receive_bit(void *inst, int bit)
}
/* Destroy transceiver instance and unlink from list. */
-void sniffer_destroy(sender_t *sender)
+static void sniffer_destroy(sender_t *sender)
{
sniffer_t *sniffer = (sniffer_t *) sender;
diff --git a/src/golay/Makefile.am b/src/golay/Makefile.am
index 1bde6cc..61121db 100644
--- a/src/golay/Makefile.am
+++ b/src/golay/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
golay
diff --git a/src/imts/Makefile.am b/src/imts/Makefile.am
index fb617e6..7d62fb1 100644
--- a/src/imts/Makefile.am
+++ b/src/imts/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
imts \
diff --git a/src/imts/dialer.c b/src/imts/dialer.c
index 4b6f2ba..ea91fdf 100644
--- a/src/imts/dialer.c
+++ b/src/imts/dialer.c
@@ -62,8 +62,11 @@ wave_rec_t wave_tx_rec;
/* dummy functions */
int num_kanal = 1; /* only one channel used for debugging */
+void *get_sender_by_empfangsfrequenz(void);
void *get_sender_by_empfangsfrequenz() { return NULL; }
+void display_measurements_add(void);
void display_measurements_add() {}
+void display_measurements_update(void);
void display_measurements_update() {}
static void print_help(const char *arg0)
diff --git a/src/imts/dsp.c b/src/imts/dsp.c
index f52e54f..0137d20 100644
--- a/src/imts/dsp.c
+++ b/src/imts/dsp.c
@@ -526,7 +526,7 @@ void sender_receive(sender_t *sender, sample_t *samples, int length, double rf_l
}
-const char *imts_dsp_mode_name(enum dsp_mode mode)
+static const char *imts_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/imts/imts.c b/src/imts/imts.c
index c38f7fb..31180df 100644
--- a/src/imts/imts.c
+++ b/src/imts/imts.c
@@ -177,7 +177,7 @@ void imts_list_channels(void)
#define RECEIVE_TIME 0.200 /* Time until detecting receive signal (Guard tone) from mobile */
#define ANSWER_TIME 0.200 /* Time until detecting answer signal (Connect tone) from mobile */
-const char *imts_state_name(enum imts_state state)
+static const char *imts_state_name(enum imts_state state)
{
static char invalid[16];
diff --git a/src/jolly/Makefile.am b/src/jolly/Makefile.am
index 2595394..1c868b6 100644
--- a/src/jolly/Makefile.am
+++ b/src/jolly/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
jollycom
diff --git a/src/jolly/jolly.c b/src/jolly/jolly.c
index b761d8a..37aa922 100644
--- a/src/jolly/jolly.c
+++ b/src/jolly/jolly.c
@@ -153,7 +153,7 @@
#define SPEECH_DELAY_VERIFY 2,0 /* time before speaking verifying sequence */
#define SPEECH_DELAY_RELEASE 2,0 /* time before speaking release sequence */
-const char *jolly_state_name(enum jolly_state state)
+static const char *jolly_state_name(enum jolly_state state)
{
static char invalid[16];
@@ -180,7 +180,7 @@ const char *jolly_state_name(enum jolly_state state)
return invalid;
}
-void jolly_display_status(void)
+static void jolly_display_status(void)
{
sender_t *sender;
jolly_t *jolly;
diff --git a/src/libaaimage/Makefile.am b/src/libaaimage/Makefile.am
index 80122aa..bac897c 100644
--- a/src/libaaimage/Makefile.am
+++ b/src/libaaimage/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libaaimage.a
diff --git a/src/libam/Makefile.am b/src/libam/Makefile.am
index a139c71..4954729 100644
--- a/src/libam/Makefile.am
+++ b/src/libam/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libam.a
diff --git a/src/libclipper/Makefile.am b/src/libclipper/Makefile.am
index 76de4b3..f25df99 100644
--- a/src/libclipper/Makefile.am
+++ b/src/libclipper/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libclipper.a
diff --git a/src/libcompandor/Makefile.am b/src/libcompandor/Makefile.am
index 4c70a7e..984f2f6 100644
--- a/src/libcompandor/Makefile.am
+++ b/src/libcompandor/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libcompandor.a
diff --git a/src/libdisplay/Makefile.am b/src/libdisplay/Makefile.am
index 8f6097d..9443600 100644
--- a/src/libdisplay/Makefile.am
+++ b/src/libdisplay/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libdisplay.a
diff --git a/src/libdtmf/Makefile.am b/src/libdtmf/Makefile.am
index f1df569..e2f7540 100644
--- a/src/libdtmf/Makefile.am
+++ b/src/libdtmf/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libdtmf.a
diff --git a/src/libemphasis/Makefile.am b/src/libemphasis/Makefile.am
index 62599a6..acd80e9 100644
--- a/src/libemphasis/Makefile.am
+++ b/src/libemphasis/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libemphasis.a
diff --git a/src/libfft/Makefile.am b/src/libfft/Makefile.am
index b6cbfc9..b134ff8 100644
--- a/src/libfft/Makefile.am
+++ b/src/libfft/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfft.a
diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am
index 45d2ec2..4b7bdc2 100644
--- a/src/libfilter/Makefile.am
+++ b/src/libfilter/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfilter.a
diff --git a/src/libfm/Makefile.am b/src/libfm/Makefile.am
index d78a28e..d74cecf 100644
--- a/src/libfm/Makefile.am
+++ b/src/libfm/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfm.a
diff --git a/src/libfsk/Makefile.am b/src/libfsk/Makefile.am
index 53f5563..fa0c6d0 100644
--- a/src/libfsk/Makefile.am
+++ b/src/libfsk/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfsk.a
diff --git a/src/libgoertzel/Makefile.am b/src/libgoertzel/Makefile.am
index 56e731d..6c5e463 100644
--- a/src/libgoertzel/Makefile.am
+++ b/src/libgoertzel/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libgoertzel.a
diff --git a/src/libhagelbarger/Makefile.am b/src/libhagelbarger/Makefile.am
index ffd50e7..c7e6656 100644
--- a/src/libhagelbarger/Makefile.am
+++ b/src/libhagelbarger/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libhagelbarger.a
diff --git a/src/libhagelbarger/hagelbarger.c b/src/libhagelbarger/hagelbarger.c
index 92774a0..3bb89d2 100644
--- a/src/libhagelbarger/hagelbarger.c
+++ b/src/libhagelbarger/hagelbarger.c
@@ -25,7 +25,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdint.h"
+#include <stdint.h>
+#include "hagelbarger.h"
/* enable to debug the process of parity check */
//#define DEBUG_HAGEL
diff --git a/src/libimage/Makefile.am b/src/libimage/Makefile.am
index 0d36ccd..fbbe316 100644
--- a/src/libimage/Makefile.am
+++ b/src/libimage/Makefile.am
@@ -1,4 +1,5 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes) $(IMAGEMAGICK_CFLAGS)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes) \
+ $(IMAGEMAGICK_CFLAGS)
noinst_LIBRARIES = libimage.a
diff --git a/src/libjitter/Makefile.am b/src/libjitter/Makefile.am
index 506ef87..81ed4c3 100644
--- a/src/libjitter/Makefile.am
+++ b/src/libjitter/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libjitter.a
diff --git a/src/liblogging/Makefile.am b/src/liblogging/Makefile.am
index a1b1e18..b0470d7 100644
--- a/src/liblogging/Makefile.am
+++ b/src/liblogging/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = liblogging.a
diff --git a/src/libmobile/Makefile.am b/src/libmobile/Makefile.am
index 28c7f42..7a67b6a 100644
--- a/src/libmobile/Makefile.am
+++ b/src/libmobile/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libmobile.a
diff --git a/src/libmobile/call.c b/src/libmobile/call.c
index 1e76acd..eb7c862 100644
--- a/src/libmobile/call.c
+++ b/src/libmobile/call.c
@@ -672,7 +672,7 @@ void call_clock(void)
}
/* messages received from fixed network */
-void ll_msg_cb(osmo_cc_endpoint_t __attribute__((unused)) *ep, uint32_t callref, osmo_cc_msg_t *msg)
+static void ll_msg_cb(osmo_cc_endpoint_t __attribute__((unused)) *ep, uint32_t callref, osmo_cc_msg_t *msg)
{
process_t *process;
uint8_t coding, location, progress, isdn_cause, socket_cause;
diff --git a/src/libmobile/call.h b/src/libmobile/call.h
index b580395..67bbf15 100644
--- a/src/libmobile/call.h
+++ b/src/libmobile/call.h
@@ -9,6 +9,9 @@ enum number_type {
TYPE_INTERNATIONAL,
};
+void encode_l16(uint8_t *src_data, int src_len, uint8_t **dst_data, int *dst_len, void __attribute__((unused)) *arg);
+void decode_l16(uint8_t *src_data, int src_len, uint8_t **dst_data, int *dst_len, void __attribute__((unused)) *arg);
+
int call_init(const char *name, int _send_patterns, int _release_on_disconnect, int use_socket, int argc, const char *argv[], int no_l16);
void call_exit(void);
int call_handle(void);
@@ -43,3 +46,6 @@ void call_down_audio(void *decoder, void *decoder_priv, int callref, uint16_t se
void call_clock(void); /* from main loop */
void call_down_clock(void); /* towards mobile implementation */
+/* display call states */
+void dump_info(void);
+
diff --git a/src/libmobile/console.c b/src/libmobile/console.c
index 349cd29..a07aae6 100755
--- a/src/libmobile/console.c
+++ b/src/libmobile/console.c
@@ -92,9 +92,6 @@ static console_t console;
extern osmo_cc_endpoint_t *ep;
-void encode_l16(uint8_t *src_data, int src_len, uint8_t **dst_data, int *dst_len, void __attribute__((unused)) *arg);
-void decode_l16(uint8_t *src_data, int src_len, uint8_t **dst_data, int *dst_len, void __attribute__((unused)) *arg);
-
static struct osmo_cc_helper_audio_codecs codecs[] = {
{ "L16", 8000, 1, encode_l16, decode_l16 },
{ NULL, 0, 0, NULL, NULL},
diff --git a/src/libmobile/main_mobile.c b/src/libmobile/main_mobile.c
index e104f8c..74208ac 100644
--- a/src/libmobile/main_mobile.c
+++ b/src/libmobile/main_mobile.c
@@ -417,8 +417,6 @@ void main_mobile_add_options(void)
#endif
};
-void print_help(const char *arg0);
-
int main_mobile_handle_options(int short_option, int argi, char **argv)
{
double gain_db;
diff --git a/src/libmobile/main_mobile.h b/src/libmobile/main_mobile.h
index 29ae00d..d5bd0a0 100644
--- a/src/libmobile/main_mobile.h
+++ b/src/libmobile/main_mobile.h
@@ -28,6 +28,8 @@ struct number_lengths {
const char *usage;
};
+void print_help(const char *);
+
const char *mobile_number_remove_prefix(const char *number);
const char *mobile_number_check_length(const char *number);
const char *mobile_number_check_digits(const char *number);
@@ -57,5 +59,3 @@ void sighandler(int sigset);
void main_mobile_loop(const char *name, int *quit, void (*myhandler)(void), const char *station_id);
-void dump_info(void);
-
diff --git a/src/libmobile/testton.c b/src/libmobile/testton.c
index 87f866f..aabe283 100644
--- a/src/libmobile/testton.c
+++ b/src/libmobile/testton.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "testton.h"
static uint16_t pattern[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0000,
diff --git a/src/libmtp/Makefile.am b/src/libmtp/Makefile.am
index d46d63b..f8bc31e 100644
--- a/src/libmtp/Makefile.am
+++ b/src/libmtp/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libmtp.a
diff --git a/src/liboptions/Makefile.am b/src/liboptions/Makefile.am
index 0d10fa7..4ad4aae 100644
--- a/src/liboptions/Makefile.am
+++ b/src/liboptions/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = liboptions.a
diff --git a/src/libsample/Makefile.am b/src/libsample/Makefile.am
index 5ae865c..c2406ca 100644
--- a/src/libsample/Makefile.am
+++ b/src/libsample/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsample.a
diff --git a/src/libsamplerate/Makefile.am b/src/libsamplerate/Makefile.am
index bd2319f..a484336 100644
--- a/src/libsamplerate/Makefile.am
+++ b/src/libsamplerate/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsamplerate.a
diff --git a/src/libscrambler/Makefile.am b/src/libscrambler/Makefile.am
index 05e1e05..64c337b 100644
--- a/src/libscrambler/Makefile.am
+++ b/src/libscrambler/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libscrambler.a
diff --git a/src/libsdr/Makefile.am b/src/libsdr/Makefile.am
index 2050a17..7d074f3 100644
--- a/src/libsdr/Makefile.am
+++ b/src/libsdr/Makefile.am
@@ -1,4 +1,5 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes) $(SOAPY_CFLAGS)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes) \
+ $(SOAPY_CFLAGS)
noinst_LIBRARIES = libsdr.a
diff --git a/src/libsendevolumenregler/Makefile.am b/src/libsendevolumenregler/Makefile.am
index 3acd414..bed8dd4 100644
--- a/src/libsendevolumenregler/Makefile.am
+++ b/src/libsendevolumenregler/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsendevolumenregler.a
diff --git a/src/libserial/Makefile.am b/src/libserial/Makefile.am
index 04fe1e9..70c4133 100644
--- a/src/libserial/Makefile.am
+++ b/src/libserial/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libserial.a
diff --git a/src/libsound/Makefile.am b/src/libsound/Makefile.am
index afbbb0a..6cd6535 100644
--- a/src/libsound/Makefile.am
+++ b/src/libsound/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsound.a
diff --git a/src/libsound/sound.h b/src/libsound/sound.h
index 6779503..c004e0e 100644
--- a/src/libsound/sound.h
+++ b/src/libsound/sound.h
@@ -13,4 +13,6 @@ void sound_close(void *inst);
int sound_write(void *inst, sample_t **samples, uint8_t **power, int num, enum paging_signal *paging_signal, int *on, int channels);
int sound_read(void *inst, sample_t **samples, int num, int channels, double *rf_level_db);
int sound_get_tosend(void *inst, int buffer_size);
+int sound_is_stereo_capture(void *inst);
+int sound_is_stereo_playback(void *inst);
diff --git a/src/libsquelch/Makefile.am b/src/libsquelch/Makefile.am
index 1f5e025..fd3cfe6 100644
--- a/src/libsquelch/Makefile.am
+++ b/src/libsquelch/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsquelch.a
diff --git a/src/libv27/Makefile.am b/src/libv27/Makefile.am
index 69873d1..8fa7117 100644
--- a/src/libv27/Makefile.am
+++ b/src/libv27/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libv27.a
diff --git a/src/libwave/Makefile.am b/src/libwave/Makefile.am
index c573515..52e094c 100644
--- a/src/libwave/Makefile.am
+++ b/src/libwave/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libwave.a
diff --git a/src/magnetic/Makefile.am b/src/magnetic/Makefile.am
index 6f9dcf7..0aaf11b 100644
--- a/src/magnetic/Makefile.am
+++ b/src/magnetic/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
cnetz_magnetic
diff --git a/src/magnetic/main.c b/src/magnetic/main.c
index 7d06804..2281752 100644
--- a/src/magnetic/main.c
+++ b/src/magnetic/main.c
@@ -32,6 +32,7 @@
#include "../liblogging/logging.h"
#include "../liboptions/options.h"
#include "../libaaimage/aaimage.h"
+#include <osmocom/cc/misc.h>
#include "iso7811.h"
int num_kanal = 1;
@@ -54,7 +55,7 @@ static const char *sicherung = "12345";
#define CNETZ_SWITCH_ON 27 /* switch closing during lead-out, in digit-duration */
#define CNETZ_SWITCH_OFF 42 /* switch opening during lead-out, in digit-duration */
-void print_help(const char *arg0)
+static void print_help(const char *arg0)
{
printf("Usage: %s [options] -a hw:0,0 <number> | service\n", arg0);
/* - - */
@@ -81,7 +82,7 @@ void print_help(const char *arg0)
printf("\n'service': BSA44 service card (to unlock phone after battery replacement)\n");
}
-void add_options(void)
+static void add_options(void)
{
option_add('h', "help", 0);
option_add('v', "debug", 1);
@@ -92,7 +93,7 @@ void add_options(void)
option_add('S', "sicherung", 1);
};
-int handle_options(int short_option, int argi, char **argv)
+static int handle_options(int short_option, int argi, char **argv)
{
int rc;
@@ -131,7 +132,7 @@ int handle_options(int short_option, int argi, char **argv)
return 1;
}
-void sighandler(int sigset)
+static void sighandler(int sigset)
{
if (sigset == SIGHUP)
return;
@@ -364,6 +365,6 @@ done:
return 0;
}
-void osmo_cc_set_log_cat(void) {}
+void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
#endif /* ARDUINO */
diff --git a/src/mate/Makefile.am b/src/mate/Makefile.am
index ef86f3e..b32cb7e 100644
--- a/src/mate/Makefile.am
+++ b/src/mate/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
matesimulator
diff --git a/src/mate/matesimulator.c b/src/mate/matesimulator.c
index a29ed51..72d1c92 100644
--- a/src/mate/matesimulator.c
+++ b/src/mate/matesimulator.c
@@ -50,8 +50,11 @@ wave_rec_t wave_tx_rec;
/* dummy functions */
int num_kanal = 1; /* only one channel used for debugging */
+void *get_sender_by_empfangsfrequenz(void);
void *get_sender_by_empfangsfrequenz() { return NULL; }
+void display_measurements_add(void);
void display_measurements_add() {}
+void display_measurements_update(void);
void display_measurements_update() {}
/* mate fill table according to eventphone's research */
diff --git a/src/mpt1327/Makefile.am b/src/mpt1327/Makefile.am
index 9ed25ab..1d5ce7a 100644
--- a/src/mpt1327/Makefile.am
+++ b/src/mpt1327/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
mpt1327
diff --git a/src/mpt1327/dsp.c b/src/mpt1327/dsp.c
index 000be65..a318d2a 100644
--- a/src/mpt1327/dsp.c
+++ b/src/mpt1327/dsp.c
@@ -318,7 +318,7 @@ void sender_send(sender_t *sender, sample_t *samples, uint8_t *power, int length
fsk_mod_send(&mpt1327->fsk_mod, samples, length, 0);
}
-const char *mpt1327_dsp_mode_name(enum dsp_mode mode)
+static const char *mpt1327_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/mpt1327/mpt1327.c b/src/mpt1327/mpt1327.c
index 022f1c5..61e2135 100755
--- a/src/mpt1327/mpt1327.c
+++ b/src/mpt1327/mpt1327.c
@@ -153,7 +153,7 @@ static mpt1327_unit_t *unit_list = NULL;
#define UNIT_CALL_CLEAR (1 << 12) /* established call */
#define UNIT_CANCEL_ACK (1 << 13) /* need to ack cancelation */
-const char *unit_state_name(uint64_t state)
+static const char *unit_state_name(uint64_t state)
{
static char invalid[32];
@@ -194,7 +194,7 @@ const char *unit_state_name(uint64_t state)
return invalid;
}
-void unit_new_state(mpt1327_unit_t *unit, uint64_t new_state)
+static void unit_new_state(mpt1327_unit_t *unit, uint64_t new_state)
{
LOGP(DMPT1327, LOGL_DEBUG, "Radio Unit (Prefix:%d Ident:%d) state: %s -> %s\n", unit->prefix, unit->ident, unit_state_name(unit->state), unit_state_name(new_state));
unit->state = new_state;
@@ -202,7 +202,7 @@ void unit_new_state(mpt1327_unit_t *unit, uint64_t new_state)
static void unit_timeout(void *data);
-mpt1327_unit_t *get_unit(uint8_t prefix, uint16_t ident)
+static mpt1327_unit_t *get_unit(uint8_t prefix, uint16_t ident)
{
mpt1327_unit_t **unitp;
@@ -224,7 +224,7 @@ mpt1327_unit_t *get_unit(uint8_t prefix, uint16_t ident)
return *unitp;
}
-mpt1327_unit_t *find_unit_state(uint32_t state, mpt1327_t *tc)
+static mpt1327_unit_t *find_unit_state(uint32_t state, mpt1327_t *tc)
{
mpt1327_unit_t *unit;
@@ -315,7 +315,7 @@ void flush_units(void)
}
}
-void dump_units(void)
+static void dump_units(void)
{
mpt1327_unit_t *unit = unit_list;
@@ -421,7 +421,7 @@ double mpt1327_channel2freq(enum mpt1327_band band, int channel, int uplink)
}
/* convert channel to chan field */
-uint16_t mpt1327_channel2chan(enum mpt1327_band band, int channel)
+static uint16_t mpt1327_channel2chan(enum mpt1327_band band, int channel)
{
uint16_t chan = 0;
@@ -544,7 +544,7 @@ static mpt1327_t *search_cc(void)
}
-const char *mpt1327_state_name(enum mpt1327_state state)
+static const char *mpt1327_state_name(enum mpt1327_state state)
{
static char invalid[16];
@@ -561,7 +561,7 @@ const char *mpt1327_state_name(enum mpt1327_state state)
return invalid;
}
-void mpt1327_display_status(void)
+static void mpt1327_display_status(void)
{
sender_t *sender;
mpt1327_t *mpt1327;
@@ -784,7 +784,7 @@ static int gtc_aloha_number(int length)
* a dummy slot is used to allow radio unit to allow multi slot response to a
* request from TSC.
*/
-int mpt1327_send_codeword_control(mpt1327_t *mpt1327, mpt1327_codeword_t *codeword)
+static int mpt1327_send_codeword_control(mpt1327_t *mpt1327, mpt1327_codeword_t *codeword)
{
mpt1327_unit_t *unit;
@@ -1029,7 +1029,7 @@ int mpt1327_send_codeword_control(mpt1327_t *mpt1327, mpt1327_codeword_t *codewo
* a SYNC is sent the next request will send the an ADDR codeword. this will
* repeat until the repeat counter reaches 0.
*/
-int mpt1327_send_codeword_traffic(mpt1327_t *mpt1327, mpt1327_codeword_t __attribute__((unused)) *codeword)
+static int mpt1327_send_codeword_traffic(mpt1327_t *mpt1327, mpt1327_codeword_t __attribute__((unused)) *codeword)
{
mpt1327_unit_t *unit;
mpt1327_t *cc;
@@ -1136,7 +1136,7 @@ static void _cancel_pending_call(mpt1327_t *mpt1327, mpt1327_unit_t *unit)
}
}
-void mpt1327_receive_codeword_control(mpt1327_t *mpt1327, mpt1327_codeword_t *codeword)
+static void mpt1327_receive_codeword_control(mpt1327_t *mpt1327, mpt1327_codeword_t *codeword)
{
mpt1327_unit_t *unit;
mpt1327_t *tc;
@@ -1438,7 +1438,7 @@ answer:
}
}
-void mpt1327_receive_codeword_traffic(mpt1327_t *mpt1327, mpt1327_codeword_t *codeword)
+static void mpt1327_receive_codeword_traffic(mpt1327_t *mpt1327, mpt1327_codeword_t *codeword)
{
mpt1327_unit_t *unit;
diff --git a/src/nmt/Makefile.am b/src/nmt/Makefile.am
index a5d7b8a..333cdd9 100644
--- a/src/nmt/Makefile.am
+++ b/src/nmt/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libdmssms.a
diff --git a/src/nmt/dms.c b/src/nmt/dms.c
index 07cad7d..c687fdf 100644
--- a/src/nmt/dms.c
+++ b/src/nmt/dms.c
@@ -106,7 +106,7 @@ static const char *print_ct_dt(uint8_t s, uint8_t n, uint8_t *data, int eight_bi
}
/* link DMS frame to list of TX frames */
-void link_dms_frame(nmt_t *nmt, struct dms_frame *frame)
+static void link_dms_frame(nmt_t *nmt, struct dms_frame *frame)
{
dms_t *dms = &nmt->dms;
struct dms_frame **framep;
@@ -121,7 +121,7 @@ void link_dms_frame(nmt_t *nmt, struct dms_frame *frame)
}
/* unlink DMS frame from list of TX frames */
-void unlink_dms_frame(nmt_t *nmt, struct dms_frame *frame)
+static void unlink_dms_frame(nmt_t *nmt, struct dms_frame *frame)
{
dms_t *dms = &nmt->dms;
struct dms_frame **framep;
diff --git a/src/nmt/dsp.c b/src/nmt/dsp.c
index 622ba65..0f39622 100644
--- a/src/nmt/dsp.c
+++ b/src/nmt/dsp.c
@@ -498,7 +498,7 @@ again:
}
}
-const char *nmt_dsp_mode_name(enum dsp_mode mode)
+static const char *nmt_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/nmt/frame.c b/src/nmt/frame.c
index cf0707b..31cb2fa 100644
--- a/src/nmt/frame.c
+++ b/src/nmt/frame.c
@@ -680,7 +680,7 @@ static struct nmt_parameter {
/* Depending on P-value, direction and additional info, frame index (used for
* nmt_frame[]) is decoded.
*/
-enum nmt_mt decode_frame_mt(const uint8_t *digits, enum nmt_direction direction, int callack)
+static enum nmt_mt decode_frame_mt(const uint8_t *digits, enum nmt_direction direction, int callack)
{
if (direction == MS_TO_MTX || direction == BS_TO_MTX || direction == XX_TO_MTX) {
/* MS/BS TO MTX */
diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c
index 60dea71..a0ee610 100644
--- a/src/nmt/nmt.c
+++ b/src/nmt/nmt.c
@@ -65,7 +65,7 @@ static int sms_ref = 0;
/* Counters */
#define PAGE_TRIES 3 /* How many time do we try to page the phone */
-const char *nmt_state_name(enum nmt_state state)
+static const char *nmt_state_name(enum nmt_state state)
{
static char invalid[16];
@@ -110,7 +110,7 @@ const char *nmt_state_name(enum nmt_state state)
return invalid;
}
-void nmt_display_status(void)
+static void nmt_display_status(void)
{
sender_t *sender;
nmt_t *nmt;
@@ -1799,7 +1799,7 @@ const char *nmt_get_frame(nmt_t *nmt)
*/
/* Call control starts call towards mobile station. */
-int _out_setup(int callref, const char *caller_id, enum number_type caller_type, const char *dialing, const char *sms)
+static int _out_setup(int callref, const char *caller_id, enum number_type caller_type, const char *dialing, const char *sms)
{
sender_t *sender;
nmt_t *nmt;
@@ -1864,7 +1864,7 @@ int call_down_setup(int callref, const char *caller_id, enum number_type caller_
{
return _out_setup(callref, caller_id, caller_type, dialing, NULL);
}
-int sms_out_setup(char *dialing, const char *caller_id, enum number_type caller_type, const char *sms)
+static int sms_out_setup(char *dialing, const char *caller_id, enum number_type caller_type, const char *sms)
{
return _out_setup(0, caller_id, caller_type, dialing, sms);
}
diff --git a/src/nmt/tones.c b/src/nmt/tones.c
index d333066..587e59f 100644
--- a/src/nmt/tones.c
+++ b/src/nmt/tones.c
@@ -1,5 +1,6 @@
#include <stdint.h>
+#include "tones.h"
static int16_t pattern[] = {
0, 5320, 10063, 13716, 15883, 16328, 15004, 12054, 7798, 2697, -2697, -7798, -12054, -15004, -16328, -15883, -13716, -10063, -5320,
diff --git a/src/pocsag/Makefile.am b/src/pocsag/Makefile.am
index e8d7509..1813ce5 100644
--- a/src/pocsag/Makefile.am
+++ b/src/pocsag/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
pocsag
diff --git a/src/pocsag/pocsag.c b/src/pocsag/pocsag.c
index 39f1045..7f3d96e 100644
--- a/src/pocsag/pocsag.c
+++ b/src/pocsag/pocsag.c
@@ -169,7 +169,7 @@ void pocsag_exit(void)
{
}
-const char *print_ric(pocsag_msg_t *msg)
+static const char *print_ric(pocsag_msg_t *msg)
{
static char text[16];
diff --git a/src/r2000/Makefile.am b/src/r2000/Makefile.am
index 0ae463e..5a7b9db 100644
--- a/src/r2000/Makefile.am
+++ b/src/r2000/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
radiocom2000
diff --git a/src/r2000/dsp.c b/src/r2000/dsp.c
index eb1c08a..41757a3 100644
--- a/src/r2000/dsp.c
+++ b/src/r2000/dsp.c
@@ -385,7 +385,7 @@ again:
}
}
-const char *r2000_dsp_mode_name(enum dsp_mode mode)
+static const char *r2000_dsp_mode_name(enum dsp_mode mode)
{
static char invalid[16];
diff --git a/src/r2000/frame.c b/src/r2000/frame.c
index 88f56e0..14589a4 100644
--- a/src/r2000/frame.c
+++ b/src/r2000/frame.c
@@ -81,7 +81,7 @@ const char *param_aga(uint64_t value)
return "<invalid>";
}
-const char *param_power(uint64_t value)
+static const char *param_power(uint64_t value)
{
switch (value) {
case 0:
@@ -114,7 +114,7 @@ const char *param_crins(uint64_t value)
return "<invalid>";
}
-const char *param_invitation(uint64_t value)
+static const char *param_invitation(uint64_t value)
{
switch (value) {
case 3:
@@ -387,7 +387,7 @@ static const char *get_frame_def(uint8_t message, int dir)
return NULL;
}
-const char *r2000_dir_name(int dir)
+static const char *r2000_dir_name(int dir)
{
return (dir == REL_TO_SM) ? "REL->SM" : "SM->REL";
}
diff --git a/src/r2000/r2000.c b/src/r2000/r2000.c
index 3439591..19cc047 100644
--- a/src/r2000/r2000.c
+++ b/src/r2000/r2000.c
@@ -136,7 +136,7 @@ const char *r2000_number_valid(const char *number)
return NULL;
}
-const char *r2000_state_name(enum r2000_state state)
+static const char *r2000_state_name(enum r2000_state state)
{
static char invalid[16];
@@ -187,7 +187,7 @@ const char *r2000_state_name(enum r2000_state state)
static const char *print_subscriber_subscr(r2000_subscriber_t *subscr);
-void r2000_display_status(void)
+static void r2000_display_status(void)
{
sender_t *sender;
r2000_t *r2000;
@@ -362,7 +362,7 @@ static int match_subscriber(r2000_t *r2000, frame_t *frame)
}
/* convert nconv to supervisory digit to be transmitted to phone */
-uint8_t r2000_encode_super(r2000_t *r2000)
+static uint8_t r2000_encode_super(r2000_t *r2000)
{
uint8_t super, nconv, relais;
@@ -533,7 +533,7 @@ void r2000_go_idle(r2000_t *r2000)
}
/* release towards station mobile */
-void r2000_release(r2000_t *r2000)
+static void r2000_release(r2000_t *r2000)
{
if (r2000->state == STATE_IDLE
|| r2000->state == STATE_OUT_ASSIGN
diff --git a/src/r2000/tones.c b/src/r2000/tones.c
index 5763c64..6eb9c0a 100644
--- a/src/r2000/tones.c
+++ b/src/r2000/tones.c
@@ -1,5 +1,6 @@
#include <stdint.h>
+#include "tones.h"
static int16_t pattern[] = {
0x0000, 0x1483,
diff --git a/src/radio/Makefile.am b/src/radio/Makefile.am
index 97a9077..6917b79 100644
--- a/src/radio/Makefile.am
+++ b/src/radio/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
if HAVE_SDR
diff --git a/src/radio/main.c b/src/radio/main.c
index b9d5f1f..e734c7c 100644
--- a/src/radio/main.c
+++ b/src/radio/main.c
@@ -35,6 +35,7 @@ enum paging_signal;
#include "../libsdr/sdr_config.h"
#include "../libsdr/sdr.h"
#include "../liboptions/options.h"
+#include <osmocom/cc/misc.h>
#include "radio.h"
#define DEFAULT_LO_OFFSET -1000000.0
@@ -45,6 +46,7 @@ int num_kanal = 1; /* only one channel used for debugging */
int rt_prio = 0;
int fast_math = 0;
+void *get_sender_by_empfangsfrequenz(void);
void *get_sender_by_empfangsfrequenz() { return NULL; }
static double frequency = 0.0;
@@ -70,7 +72,7 @@ static int rds2 = 0;
/* global variable to quit main loop */
int quit = 0;
-void sighandler(int sigset)
+static void sighandler(int sigset)
{
if (sigset == SIGHUP)
return;
@@ -100,7 +102,7 @@ static int get_char()
return -1;
}
-void print_help(const char *arg0)
+static void print_help(const char *arg0)
{
printf("Usage: %s --sdr-soapy|--sdr-uhd <sdr options> -f <frequency> -M <modulation> -R|-T [options]\n", arg0);
@@ -531,5 +533,5 @@ error:
return 0;
}
-void osmo_cc_set_log_cat(void) {}
+void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am
index cffc9d7..1a63b07 100644
--- a/src/sim/Makefile.am
+++ b/src/sim/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
cnetz_sim
diff --git a/src/sim/main.c b/src/sim/main.c
index aa6137f..147967a 100644
--- a/src/sim/main.c
+++ b/src/sim/main.c
@@ -34,6 +34,7 @@
#include "../liboptions/options.h"
#include "../libserial/serial.h"
#include "../libaaimage/aaimage.h"
+#include <osmocom/cc/misc.h>
#include "sim.h"
#include "sniffer.h"
#include "eeprom.h"
@@ -62,7 +63,7 @@ static const char *auth = NULL;
#define TIMEOUT 0.2
-void print_help(const char *arg0)
+static void print_help(const char *arg0)
{
printf("Usage: %s [options] <command>\n", arg0);
/* - - */
@@ -113,7 +114,7 @@ void print_help(const char *arg0)
#define OPT_SONDER 258
#define OPT_WARTUNG 259
-void add_options(void)
+static void add_options(void)
{
option_add('h', "help", 0);
option_add('v', "debug", 1);
@@ -131,7 +132,7 @@ void add_options(void)
option_add('A', "auth", 1);
};
-int handle_options(int short_option, int argi, char **argv)
+static int handle_options(int short_option, int argi, char **argv)
{
int rc;
@@ -228,7 +229,7 @@ size_t eeprom_length(void)
/* main loop for interfacing serial with sim / sniffer */
-int main_loop(serial_t *serial, int sniffer)
+static int main_loop(serial_t *serial, int sniffer)
{
int rc, cts = 0, last_cts = 0;
uint8_t byte;
@@ -312,7 +313,7 @@ int main_loop(serial_t *serial, int sniffer)
return quit;
}
-void sighandler(int sigset)
+static void sighandler(int sigset)
{
if (sigset == SIGHUP)
return;
@@ -501,6 +502,6 @@ error:
return 0;
}
-void osmo_cc_set_log_cat(void) {}
+void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
#endif /* ARDUINO */
diff --git a/src/sim/sim.c b/src/sim/sim.c
index b6446ae..6b6be97 100644
--- a/src/sim/sim.c
+++ b/src/sim/sim.c
@@ -419,7 +419,7 @@ static int validate_pin(sim_sim_t *sim, uint8_t *data, int length)
/* message buffer handling */
/* get space for return message */
-uint8_t *alloc_msg(sim_sim_t *sim, int size)
+static uint8_t *alloc_msg(sim_sim_t *sim, int size)
{
/* we add 4, because we push 4 bytes (ICL and L2 header later) */
if (size + 4 > (int)sizeof(sim->block_tx_data))
@@ -428,7 +428,7 @@ uint8_t *alloc_msg(sim_sim_t *sim, int size)
}
/* push space in front of a message */
-uint8_t *push_msg(uint8_t *data, int length, int offset)
+static uint8_t *push_msg(uint8_t *data, int length, int offset)
{
int i;
diff --git a/src/sim/sim.h b/src/sim/sim.h
index cc65595..e21bab1 100644
--- a/src/sim/sim.h
+++ b/src/sim/sim.h
@@ -139,6 +139,9 @@ enum l2_cmd {
#define APP_NETZ_C 3
#define APP_RUFN_GEBZ 4
+/* defined for main.c */
+size_t eeprom_length(void);
+
int encode_ebdt(uint8_t *data, const char *futln, const char *sicherung, const char *karten, const char *sonder, const char *wartung);
void decode_ebdt(uint8_t *data, char *futln, char *sicherung, char *karten, char *sonder, char *wartung);
int directory_size(void);
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index dd5b11a..e37d9bf 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_PROGRAMS = \
test_filter \
diff --git a/src/test/dummy.c b/src/test/dummy.c
index 5d08d6b..ef9c8c0 100644
--- a/src/test/dummy.c
+++ b/src/test/dummy.c
@@ -1,9 +1,18 @@
+void call_down_audio(void);
void call_down_audio() { }
+void call_down_setup(void);
void call_down_setup() { }
+void call_down_release(void);
void call_down_release() { }
+void call_down_disconnect(void);
void call_down_disconnect() { }
+void call_down_answer(void);
void call_down_answer() { }
+void print_help(void);
void print_help() { }
+void sender_send(void);
void sender_send() { }
+void sender_receive(void);
void sender_receive() { }
+void dump_info(void);
void dump_info() {}
diff --git a/src/test/test_dms.c b/src/test/test_dms.c
index f73f735..e571fd9 100644
--- a/src/test/test_dms.c
+++ b/src/test/test_dms.c
@@ -20,7 +20,7 @@ static void assert(int condition, char *why)
}
}
-void ok(void)
+static void ok(void)
{
printf("\n OK ;->\n\n");
sleep(1);
@@ -39,7 +39,7 @@ static const uint8_t test_null[][8] = {
static char ack_bits[77];
-void dms_receive(nmt_t *nmt, const uint8_t *data, int length, int eight_bits)
+void dms_receive(nmt_t __attribute__((unused)) *nmt, const uint8_t *data, int length, int __attribute__((unused)) eight_bits)
{
printf("(getting %d digits from DMS layer)\n", length);
@@ -49,11 +49,11 @@ void dms_receive(nmt_t *nmt, const uint8_t *data, int length, int eight_bits)
check_length = length;
}
-void dms_all_sent(nmt_t *nmt)
+void dms_all_sent(nmt_t __attribute__((unused)) *nmt)
{
}
-nmt_t *alloc_nmt(void)
+static nmt_t *alloc_nmt(void)
{
nmt_t *nmt;
@@ -65,7 +65,7 @@ nmt_t *alloc_nmt(void)
return nmt;
}
-void free_nmt(nmt_t *nmt)
+static void free_nmt(nmt_t *nmt)
{
dms_cleanup_sender(nmt);
free(nmt);
diff --git a/src/test/test_dtmf.c b/src/test/test_dtmf.c
index 6cf8ebe..5b92634 100644
--- a/src/test/test_dtmf.c
+++ b/src/test/test_dtmf.c
@@ -49,7 +49,7 @@ static void check_level(sample_t *samples, const char *desc, double target, int
static char got_digit;
-static void recv_digit(void *inst, char digit, dtmf_meas_t *meas)
+static void recv_digit(void __attribute__((unused)) *inst, char digit, dtmf_meas_t *meas)
{
printf("decoded digit '%c' frequency %.1f %.1f amplitude %.1f %.1f dB\n", digit, meas->frequency_low, meas->frequency_high, level2db(meas->amplitude_low), level2db(meas->amplitude_high));
got_digit = digit;
diff --git a/src/test/test_sms.c b/src/test/test_sms.c
index 2ffe805..cb3dd6a 100644
--- a/src/test/test_sms.c
+++ b/src/test/test_sms.c
@@ -53,7 +53,7 @@ static void assert(int condition, char *why)
}
}
-void ok(void)
+static void ok(void)
{
printf("\n OK ;->\n\n");
sleep(1);
@@ -61,7 +61,7 @@ void ok(void)
static uint8_t dms_buffer[256];
static int dms_buffer_count;
-void dms_send(nmt_t *nmt, const uint8_t *data, int length, int eight_bits)
+void dms_send(nmt_t __attribute__((unused)) *nmt, const uint8_t *data, int length, int __attribute__((unused)) eight_bits)
{
int i;
@@ -80,12 +80,12 @@ void dms_send(nmt_t *nmt, const uint8_t *data, int length, int eight_bits)
assert(!memcmp(data, test_mt_sms_data, length), "Expecting SMS binary data to match");
}
-void sms_release(nmt_t *nmt)
+void sms_release(nmt_t __attribute__((unused)) *nmt)
{
printf("(got release from SMS layer)\n");
}
-int sms_submit(nmt_t *nmt, uint8_t ref, const char *orig_address, uint8_t orig_type, uint8_t orig_plan, int msg_ref, const char *dest_address, uint8_t dest_type, uint8_t dest_plan, const char *message)
+int sms_submit(nmt_t __attribute__((unused)) *nmt, uint8_t __attribute__((unused)) ref, const char __attribute__((unused)) *orig_address, uint8_t __attribute__((unused)) orig_type, uint8_t __attribute__((unused)) orig_plan, int __attribute__((unused)) msg_ref, const char __attribute__((unused)) *dest_address, uint8_t __attribute__((unused)) dest_type, uint8_t __attribute__((unused)) dest_plan, const char *message)
{
strcpy((char *)dms_buffer, message);
dms_buffer_count = strlen(message);
@@ -93,7 +93,7 @@ int sms_submit(nmt_t *nmt, uint8_t ref, const char *orig_address, uint8_t orig_t
return 0;
}
-void sms_deliver_report(nmt_t *nmt, uint8_t ref, int error, uint8_t cause)
+void sms_deliver_report(nmt_t __attribute__((unused)) *nmt, uint8_t __attribute__((unused)) ref, int __attribute__((unused)) error, uint8_t __attribute__((unused)) cause)
{
printf("(got deliver report from SMS layer)\n");
}
@@ -132,10 +132,10 @@ int main(void)
printf("(submitting SMS 7-bit encoded)\n");
dms_buffer_count = 0;
- for (i = 0; i < sizeof(test_mo_sms_data1); i++)
+ for (i = 0; i < (int)sizeof(test_mo_sms_data1); i++)
dms_receive(nmt, test_mo_sms_data1 + i, 1, 1);
- assert(dms_buffer_count == strlen(test_mo_sms_text1), "Expecting SMS text length to match");
+ assert(dms_buffer_count == (int)strlen(test_mo_sms_text1), "Expecting SMS text length to match");
assert(!memcmp(dms_buffer, test_mo_sms_text1, dms_buffer_count), "Expecting SMS text to match");
sms_cleanup_sender(nmt);
@@ -149,10 +149,10 @@ int main(void)
printf("(submitting SMS 8-bit encoded)\n");
dms_buffer_count = 0;
- for (i = 0; i < sizeof(test_mo_sms_data2); i++)
+ for (i = 0; i < (int)sizeof(test_mo_sms_data2); i++)
dms_receive(nmt, test_mo_sms_data2 + i, 1, 1);
- assert(dms_buffer_count == strlen(test_mo_sms_text2), "Expecting SMS text length to match");
+ assert(dms_buffer_count == (int)strlen(test_mo_sms_text2), "Expecting SMS text length to match");
assert(!memcmp(dms_buffer, test_mo_sms_text2, dms_buffer_count), "Expecting SMS text to match");
sms_cleanup_sender(nmt);
diff --git a/src/tv/Makefile.am b/src/tv/Makefile.am
index ada0fdf..8297bf8 100644
--- a/src/tv/Makefile.am
+++ b/src/tv/Makefile.am
@@ -1,4 +1,5 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes) $(IMAGEMAGICK_CFLAGS)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes) \
+ $(IMAGEMAGICK_CFLAGS)
bin_PROGRAMS = \
osmotv
diff --git a/src/tv/channels.c b/src/tv/channels.c
index fc2ad00..e7ff12a 100644
--- a/src/tv/channels.c
+++ b/src/tv/channels.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include "channels.h"
static struct tv_channels {
const char *channel;
diff --git a/src/tv/main.c b/src/tv/main.c
index 15ad60c..db2e0db 100644
--- a/src/tv/main.c
+++ b/src/tv/main.c
@@ -39,6 +39,7 @@ enum paging_signal;
#include "../libsdr/sdr.h"
#endif
#include "../liboptions/options.h"
+#include <osmocom/cc/misc.h>
#include "bas.h"
#include "tv_modulate.h"
#include "channels.h"
@@ -50,6 +51,7 @@ int use_sdr = 0;
int num_kanal = 1; /* only one channel used for debugging */
int rt_prio = 0;
+void *get_sender_by_empfangsfrequenz(void);
void *get_sender_by_empfangsfrequenz() { return NULL; }
static double __attribute__((__unused__)) modulation = 0.7; /* level of modulation for I/Q amplitudes */
@@ -68,7 +70,7 @@ static const char *wave_file = NULL;
/* global variable to quit main loop */
int quit = 0;
-void sighandler(int sigset)
+static void sighandler(int sigset)
{
if (sigset == SIGHUP)
return;
@@ -81,7 +83,7 @@ void sighandler(int sigset)
quit = 1;
}
-void print_help(const char *arg0)
+static void print_help(const char *arg0)
{
printf("Usage: %s -f <frequency> | -c <channel> <command>\n", arg0);
@@ -571,5 +573,5 @@ int main(int argc, char *argv[])
return 0;
}
-void osmo_cc_set_log_cat(void) {}
+void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
diff --git a/src/zeitansage/Makefile.am b/src/zeitansage/Makefile.am
index 8451c41..544e428 100644
--- a/src/zeitansage/Makefile.am
+++ b/src/zeitansage/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
zeitansage
diff --git a/src/zeitansage/samples.c b/src/zeitansage/samples.c
index ad94755..ed7adbc 100644
--- a/src/zeitansage/samples.c
+++ b/src/zeitansage/samples.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include "samples.h"
static int16_t pattern_bntie[] = {
0xfff2, 0xffc9, 0xffe2, 0xffc9, 0xff24, 0xff1d, 0xff11, 0xfee4,