Fix compiler warnings

This commit is contained in:
Andreas Eversberg 2018-01-27 15:52:33 +01:00
parent 4cc33c5b0d
commit 6df0eb46cc
9 changed files with 12 additions and 9 deletions

View File

@ -704,7 +704,7 @@ void amps_rx_signaling_tone(amps_t *amps, int tone, double quality)
case TRANS_CALL: case TRANS_CALL:
if (!tone) if (!tone)
break; break;
/* fall through */ /* FALLTHRU */
case TRANS_CALL_RELEASE: case TRANS_CALL_RELEASE:
case TRANS_CALL_RELEASE_SEND: case TRANS_CALL_RELEASE_SEND:
/* also loosing singaling tone indicates release confirm (after alerting) */ /* also loosing singaling tone indicates release confirm (after alerting) */

View File

@ -553,6 +553,7 @@ static void fsk_rx_bit(amps_t *amps, sample_t *spl, int len, int pos, int begin,
case 0x01: case 0x01:
if (!amps->fsk_rx_sync_tolerant) if (!amps->fsk_rx_sync_tolerant)
break; break;
/* FALLTHRU */
case 0x00: case 0x00:
#ifdef DEBUG_DECODER #ifdef DEBUG_DECODER
printf("Sync word detected (positive)\n"); printf("Sync word detected (positive)\n");
@ -568,6 +569,7 @@ prepare_frame:
case 0x81: case 0x81:
if (!amps->fsk_rx_sync_tolerant) if (!amps->fsk_rx_sync_tolerant)
break; break;
/* FALLTHRU */
case 0x80: case 0x80:
#ifdef DEBUG_DECODER #ifdef DEBUG_DECODER
printf("Sync word detected (negative)\n"); printf("Sync word detected (negative)\n");

View File

@ -196,7 +196,7 @@ void sender_receive(sender_t *sender, sample_t *samples, int length, double rf_l
switch (squelch(&anetz->squelch, rf_level_db, (double)length / (double)anetz->sender.samplerate)) { switch (squelch(&anetz->squelch, rf_level_db, (double)length / (double)anetz->sender.samplerate)) {
case SQUELCH_LOSS: case SQUELCH_LOSS:
anetz_loss_indication(anetz, LOSS_TIME); anetz_loss_indication(anetz, LOSS_TIME);
// fall through: /* FALLTHRU */
case SQUELCH_MUTE: case SQUELCH_MUTE:
memset(samples, 0, sizeof(*samples) * length); memset(samples, 0, sizeof(*samples) * length);
break; break;

View File

@ -219,7 +219,7 @@ void sender_receive(sender_t *sender, sample_t *samples, int length, double rf_l
switch (squelch(&bnetz->squelch, rf_level_db, (double)length / (double)bnetz->sender.samplerate)) { switch (squelch(&bnetz->squelch, rf_level_db, (double)length / (double)bnetz->sender.samplerate)) {
case SQUELCH_LOSS: case SQUELCH_LOSS:
bnetz_loss_indication(bnetz, LOSS_TIME); bnetz_loss_indication(bnetz, LOSS_TIME);
// fall through: /* FALLTHRU */
case SQUELCH_MUTE: case SQUELCH_MUTE:
memset(samples, 0, sizeof(*samples) * length); memset(samples, 0, sizeof(*samples) * length);
break; break;

View File

@ -379,7 +379,7 @@ got_sync:
break; break;
case FSK_SYNC_NEGATIVE: case FSK_SYNC_NEGATIVE:
bit = 1 - bit; bit = 1 - bit;
/* fall through */ /* FALLTHRU */
case FSK_SYNC_POSITIVE: case FSK_SYNC_POSITIVE:
fsk->rx_buffer[fsk->rx_buffer_count] = bit + '0'; fsk->rx_buffer[fsk->rx_buffer_count] = bit + '0';
if (++fsk->rx_buffer_count == 150) { if (++fsk->rx_buffer_count == 150) {

View File

@ -454,7 +454,7 @@ int init_telegramm(void)
const char *telegramm2rufnummer(telegramm_t *telegramm) const char *telegramm2rufnummer(telegramm_t *telegramm)
{ {
static char rufnummer[9]; static char rufnummer[32]; /* make GCC happy (overflow check) */
sprintf(rufnummer, "%d%d%05d", telegramm->futln_nationalitaet, telegramm->futln_heimat_fuvst_nr, telegramm->futln_rest_nr); sprintf(rufnummer, "%d%d%05d", telegramm->futln_nationalitaet, telegramm->futln_heimat_fuvst_nr, telegramm->futln_rest_nr);

View File

@ -30,7 +30,7 @@
const char *transaction2rufnummer(transaction_t *trans) const char *transaction2rufnummer(transaction_t *trans)
{ {
static char rufnummer[9]; static char rufnummer[32]; /* make GCC happy (overflow check) */
sprintf(rufnummer, "%d%d%05d", trans->futln_nat, trans->futln_fuvst, trans->futln_rest); sprintf(rufnummer, "%d%d%05d", trans->futln_nat, trans->futln_fuvst, trans->futln_rest);

View File

@ -384,7 +384,8 @@ void sender_send(sender_t *sender, sample_t *samples, uint8_t *power, int length
memset(samples + count, 0, sizeof(*samples) * (length - count)); memset(samples + count, 0, sizeof(*samples) * (length - count));
break; break;
} }
/* fall through, in case of no voice */ /* in case of no voice: */
/* FALLTHRU */
default: default:
memset(power, 1, length); memset(power, 1, length);
dial_tone(jolly, samples, length); dial_tone(jolly, samples, length);

View File

@ -239,7 +239,7 @@ static void gen_paging_tone(sound_t *sound, int16_t *samples, int length, enum p
case PAGING_SIGNAL_NOTONE: case PAGING_SIGNAL_NOTONE:
/* no tone if paging signal is on */ /* no tone if paging signal is on */
on = !on; on = !on;
// fall through /* FALLTHRU */
case PAGING_SIGNAL_TONE: case PAGING_SIGNAL_TONE:
/* tone if paging signal is on */ /* tone if paging signal is on */
if (on) { if (on) {
@ -261,7 +261,7 @@ static void gen_paging_tone(sound_t *sound, int16_t *samples, int length, enum p
case PAGING_SIGNAL_NEGATIVE: case PAGING_SIGNAL_NEGATIVE:
/* negative signal if paging signal is on */ /* negative signal if paging signal is on */
on = !on; on = !on;
// fall through /* FALLTHRU */
case PAGING_SIGNAL_POSITIVE: case PAGING_SIGNAL_POSITIVE:
/* positive signal if paging signal is on */ /* positive signal if paging signal is on */
if (on) if (on)