Increase compiler warnings and fix them

This commit is contained in:
Andreas Eversberg 2024-04-05 21:51:41 +02:00
parent 470fc49341
commit 6e2fd793ac
123 changed files with 231 additions and 168 deletions

View File

@ -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

View File

@ -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];

View File

@ -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);

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "tones.h"
static int16_t pattern_ringback[1000] = {
0x00e5, 0x0070, 0x001c, 0x0001, 0x001c, 0x0070, 0x00e5, 0x0168,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "outoforder.h"
static int16_t pattern[] = {
0x0000, 0x0000, 0xffff, 0x0002, 0xfffe, 0x0003, 0xfffd, 0x0001,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "tones.h"
static int16_t pattern_ringback[] = {
0x000b, 0x0008, 0x000d, 0x000e, 0x000d, 0x0012, 0x0011, 0xffcd,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "congestion.h"
static int16_t pattern[] = {
0xfffd, 0x0004, 0xfffb, 0x0004, 0xfffe, 0x0001, 0x0001, 0xfffe,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "invalidnumber.h"
static int16_t pattern[] = {
0xfffe, 0x0001, 0xffff, 0x0001, 0xffff, 0x0002, 0xfffe, 0x0002,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "noanswer.h"
static int16_t pattern[] = {
0xfe24, 0xfd20, 0xfd2c, 0xfdb5, 0xfeba, 0xfe20, 0xfd41, 0xfe32,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "outoforder.h"
static int16_t pattern[] = {
0xfeae, 0xfde4, 0xfe26, 0xfea7, 0xfe94, 0xfe8a, 0xfeb4, 0xfe3b,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "tones.h"
static int16_t pattern_ringback[] = {
0x0070, 0x00dd, 0x013b, 0x0192, 0x0191, 0x0153, 0x0099, 0xffb2,

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
anetz

View File

@ -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;

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "besetztton.h"
static int16_t pattern[] = {
0x0004, 0xffe9, 0xffc9, 0xffac, 0xff92, 0xff83, 0xff75, 0xff56,

View File

@ -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];

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "freiton.h"
static int16_t pattern[] = {
0x0056, 0x0068, 0x0065, 0x005d, 0x0040, 0x0031, 0x001a, 0x000d,

View File

@ -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();

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
bnetz \

View File

@ -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;

View File

@ -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

View File

@ -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];

View File

@ -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();

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
cnetz

View File

@ -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:

View File

@ -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];

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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) {}

View File

@ -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 = \

View File

@ -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)

View File

@ -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) {}

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
eurosignal

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "es_ges.h"
static int16_t pattern[] = {
0x003f, 0xff8e, 0x0092, 0x0097, 0x001f, 0x0048, 0xffd9, 0xffdb,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "es_kaudn.h"
static int16_t pattern[] = {
0x0022, 0x0014, 0xffde, 0xff85, 0xff24, 0xff00, 0xff2c, 0xff88,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "es_mitte.h"
static int16_t pattern[] = {
0xff96, 0xffd4, 0x0020, 0x0073, 0x0084, 0x0061, 0x002f, 0xfffd,

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "es_teilges.h"
static int16_t pattern[] = {
0xffa4, 0xffae, 0xffc2, 0xff8a, 0xffb4, 0xfff0, 0xfffa, 0x0005,

View File

@ -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

View File

@ -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;

View File

@ -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 = \

View File

@ -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:

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
golay

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
imts \

View File

@ -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)

View File

@ -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];

View File

@ -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];

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
jollycom

View File

@ -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;

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libaaimage.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libam.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libclipper.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libcompandor.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libdisplay.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libdtmf.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libemphasis.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfft.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfilter.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfm.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libfsk.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libgoertzel.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libhagelbarger.a

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libjitter.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = liblogging.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libmobile.a

View File

@ -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;

View File

@ -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);

View File

@ -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},

View File

@ -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;

View File

@ -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);

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include "testton.h"
static uint16_t pattern[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0000,

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libmtp.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = liboptions.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsample.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsamplerate.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libscrambler.a

View File

@ -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

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsendevolumenregler.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libserial.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsound.a

View File

@ -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);

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libsquelch.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libv27.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libwave.a

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
cnetz_magnetic

View File

@ -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 */

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
matesimulator

View File

@ -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 */

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
bin_PROGRAMS = \
mpt1327

View File

@ -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];

View File

@ -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;

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
AM_CPPFLAGS = -Wall -Wextra -Wmissing-prototypes -g $(all_includes)
noinst_LIBRARIES = libdmssms.a

View File

@ -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;

View File

@ -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];

View File

@ -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 */

View File

@ -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);
}

View File

@ -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,

Some files were not shown because too many files have changed in this diff Show More