mirror of https://github.com/lwvmobile/dsd-fme.git
Merge pull request #150 from volo-zyko/fix-unusedParameterWarnings
Fix more warnings, now with unused parameters
This commit is contained in:
commit
8310f87504
|
|
@ -94,7 +94,7 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
|
|||
ADD_EXECUTABLE(dsd-fme ${SRCS} ${HEADERS})
|
||||
TARGET_LINK_LIBRARIES(dsd-fme ${LIBS})
|
||||
|
||||
target_compile_options(dsd-fme PRIVATE -Wunused-but-set-variable -Wunused-variable)
|
||||
target_compile_options(dsd-fme PRIVATE -Wunused-but-set-variable -Wunused-variable -Wunused-parameter)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS dsd-fme DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
|
|
|||
|
|
@ -406,6 +406,8 @@ void dmr_udt_cspdu_converter (dsd_opts * opts, dsd_state * state, uint8_t block_
|
|||
//assemble the blocks as they come in, shuffle them into the unified dmr_pdu_sf
|
||||
void dmr_block_assembler (dsd_opts * opts, dsd_state * state, uint8_t block_bytes[], uint8_t block_len, uint8_t databurst, uint8_t type)
|
||||
{
|
||||
UNUSED(databurst);
|
||||
|
||||
int i, j;
|
||||
uint8_t lb = 0; //mbc last block
|
||||
uint8_t pf = 0; //mbc protect flag
|
||||
|
|
@ -767,6 +769,8 @@ void dmr_block_assembler (dsd_opts * opts, dsd_state * state, uint8_t block_byte
|
|||
//or tuning away and we can no longer verify accurate data block reporting
|
||||
void dmr_reset_blocks (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
memset (state->data_p_head, 0, sizeof(state->data_p_head));
|
||||
memset (state->data_conf_data, 0, sizeof(state->data_conf_data));
|
||||
memset (state->dmr_pdu_sf, 0, sizeof(state->dmr_pdu_sf));
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
//combined flco handler (vlc, tlc, emb), minus the superfluous structs and strings
|
||||
void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t CRCCorrect, uint32_t IrrecoverableErrors, uint8_t type)
|
||||
{
|
||||
UNUSED(CRCCorrect);
|
||||
|
||||
//force slot to 0 if using dmr mono handling
|
||||
if (opts->dmr_mono == 1) state->currentslot = 0;
|
||||
|
|
@ -955,6 +956,7 @@ void dmr_slco (dsd_opts * opts, dsd_state * state, uint8_t slco_bits[])
|
|||
//externalize embedded alias to keep the flco function relatively clean
|
||||
void dmr_embedded_alias_header (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
uint8_t slot = state->currentslot;
|
||||
uint8_t format = (uint8_t)ConvertBitIntoBytes(&lc_bits[16], 2);
|
||||
|
|
@ -976,6 +978,8 @@ void dmr_embedded_alias_header (dsd_opts * opts, dsd_state * state, uint8_t lc_b
|
|||
|
||||
void dmr_embedded_alias_blocks (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
fprintf (stderr, "%s", KYEL);
|
||||
fprintf (stderr, " Embedded Alias: ");
|
||||
uint8_t slot = state->currentslot;
|
||||
|
|
@ -1044,6 +1048,8 @@ void dmr_embedded_alias_blocks (dsd_opts * opts, dsd_state * state, uint8_t lc_b
|
|||
//externalize embedded GPS - Needs samples to test/fix function
|
||||
void dmr_embedded_gps (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
fprintf (stderr, "%s", KYEL);
|
||||
fprintf (stderr, " Embedded GPS:");
|
||||
uint8_t slot = state->currentslot;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ void dmr_late_entry_mi_fragment (dsd_opts * opts, dsd_state * state, uint8_t vc,
|
|||
|
||||
void dmr_late_entry_mi (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
uint8_t slot = state->currentslot;
|
||||
int i, j;
|
||||
int g[3];
|
||||
|
|
@ -124,6 +126,8 @@ void dmr_late_entry_mi (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void dmr_alg_refresh (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
if (state->currentslot == 0)
|
||||
{
|
||||
state->dropL = 256;
|
||||
|
|
@ -163,6 +167,8 @@ void dmr_alg_refresh (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void dmr_alg_reset (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
state->dropL = 256;
|
||||
state->dropR = 256;
|
||||
state->DMRvcL = 0;
|
||||
|
|
|
|||
|
|
@ -414,6 +414,8 @@ void dmr_lrrp (dsd_opts * opts, dsd_state * state, uint8_t block_len, uint8_t DM
|
|||
|
||||
void dmr_locn (dsd_opts * opts, dsd_state * state, uint8_t block_len, uint8_t DMR_PDU[])
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
int i;
|
||||
uint8_t slot = state->currentslot;
|
||||
uint8_t blocks = state->data_header_blocks[slot];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRCCorrect, uint32_t IrrecoverableErrors)
|
||||
{
|
||||
UNUSED2(opts, CRCCorrect);
|
||||
|
||||
if((IrrecoverableErrors == 0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -423,6 +423,8 @@ void writeSynthesizedVoiceR (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void writeRawSample (dsd_opts * opts, dsd_state * state, short sample)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
//short aout_buf[160];
|
||||
//sf_write_short(opts->wav_out_raw, aout_buf, 160);
|
||||
|
||||
|
|
@ -506,6 +508,8 @@ playSynthesizedVoiceR (dsd_opts * opts, dsd_state * state)
|
|||
void
|
||||
openAudioOutDevice (dsd_opts * opts, int speed)
|
||||
{
|
||||
UNUSED(speed);
|
||||
|
||||
//converted to handle any calls to use portaudio
|
||||
if(strncmp(opts->audio_out_dev, "pa:", 3) == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,6 +118,8 @@ print_datascope(dsd_opts* opts, dsd_state* state, int* sbuf2)
|
|||
static void
|
||||
use_symbol (dsd_opts* opts, dsd_state* state, int symbol)
|
||||
{
|
||||
UNUSED(symbol);
|
||||
|
||||
int i;
|
||||
int sbuf2[128];
|
||||
int lmin, lmax, lsum;
|
||||
|
|
|
|||
|
|
@ -352,6 +352,8 @@ openMbeInFile (dsd_opts * opts, dsd_state * state)
|
|||
//slot 1
|
||||
void closeMbeOutFile (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
if (opts->mbe_out == 1)
|
||||
{
|
||||
if (opts->mbe_out_f != NULL)
|
||||
|
|
@ -369,6 +371,8 @@ void closeMbeOutFile (dsd_opts * opts, dsd_state * state)
|
|||
//slot 2
|
||||
void closeMbeOutFileR (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
if (opts->mbe_outR == 1)
|
||||
{
|
||||
if (opts->mbe_out_fR != NULL)
|
||||
|
|
@ -479,6 +483,7 @@ void openMbeOutFileR (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void openWavOutFile (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
SF_INFO info;
|
||||
info.samplerate = 8000; //8000
|
||||
|
|
@ -495,6 +500,7 @@ void openWavOutFile (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void openWavOutFileL (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
SF_INFO info;
|
||||
info.samplerate = 8000;
|
||||
|
|
@ -511,6 +517,7 @@ void openWavOutFileL (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void openWavOutFileR (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
SF_INFO info;
|
||||
info.samplerate = 8000; //8000
|
||||
|
|
@ -527,6 +534,7 @@ void openWavOutFileR (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void openWavOutFileRaw (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
SF_INFO info;
|
||||
info.samplerate = 48000; //8000
|
||||
|
|
@ -542,21 +550,29 @@ void openWavOutFileRaw (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void closeWavOutFile (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_f);
|
||||
}
|
||||
|
||||
void closeWavOutFileL (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_f);
|
||||
}
|
||||
|
||||
void closeWavOutFileR (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_fR);
|
||||
}
|
||||
|
||||
void closeWavOutFileRaw (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_raw);
|
||||
}
|
||||
|
||||
|
|
@ -568,6 +584,8 @@ void openSymbolOutFile (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void closeSymbolOutFile (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
if (opts->symbol_out_f)
|
||||
{
|
||||
fclose(opts->symbol_out_f);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ char * getDate(void) {
|
|||
void
|
||||
printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation)
|
||||
{
|
||||
UNUSED3(state, offset, modulation);
|
||||
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,10 @@
|
|||
|
||||
volatile uint8_t exitflag; //fix for issue #136
|
||||
|
||||
void handler(int zzz)
|
||||
void handler(int sgnl)
|
||||
{
|
||||
UNUSED(sgnl);
|
||||
|
||||
exitflag = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
void keyring(dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
if (state->currentslot == 0)
|
||||
state->R = state->rkey_array[state->payload_keyid];
|
||||
|
|
|
|||
|
|
@ -194,6 +194,8 @@ void beeper (dsd_opts * opts, dsd_state * state, int type)
|
|||
#else
|
||||
void beeper (dsd_opts * opts, dsd_state * state, int type)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
FILE *beep;
|
||||
char wav_name[1024] = {0};
|
||||
|
||||
|
|
@ -418,6 +420,8 @@ void print_menuc(WINDOW *menu_win, int highlight)
|
|||
|
||||
void ncursesOpen (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED2(opts, state);
|
||||
|
||||
// state->menuopen = 1; //flag the menu is open, stop processing getFrameSync
|
||||
mbe_printVersion (versionstr);
|
||||
setlocale(LC_ALL, "");
|
||||
|
|
|
|||
|
|
@ -222,6 +222,8 @@ bool GetSignalLevelEx(int sockfd, double *dBFS, int n_samp)
|
|||
//shoe in UDP input connection here...still having issues that I don't know how to resolve
|
||||
int UDPBind (char *hostname, int portno)
|
||||
{
|
||||
UNUSED(hostname);
|
||||
|
||||
int sockfd;
|
||||
struct sockaddr_in serveraddr;
|
||||
|
||||
|
|
@ -252,6 +254,8 @@ int UDPBind (char *hostname, int portno)
|
|||
//going to leave this function available, even if completely switched over to rtl_dev_tune now, may be useful in the future
|
||||
void rtl_udp_tune(dsd_opts * opts, dsd_state * state, long int frequency)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
int handle;
|
||||
unsigned short udp_port = opts->rtl_udp_port;
|
||||
char data[5] = {0}; //data buffer size is 5 for UDP frequency tuning
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
void
|
||||
openSerial (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
struct termios tty;
|
||||
speed_t baud;
|
||||
|
|
|
|||
|
|
@ -898,6 +898,7 @@ void nxdn_deperm_facch3_udch2(dsd_opts * opts, dsd_state * state, uint8_t bits[2
|
|||
|
||||
void nxdn_message_type (dsd_opts * opts, dsd_state * state, uint8_t MessageType)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
//NOTE: Most Req/Resp (request and respone) share same message type but differ depending on channel type
|
||||
//RTCH Outbound will take precedent when differences may occur (except CALL_ASSGN)
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ void nxdn_location_id_handler (dsd_state * state, uint32_t location_id, uint8_t
|
|||
|
||||
void nxdn_srv_info_handler (dsd_state * state, uint16_t svc_info)
|
||||
{
|
||||
UNUSED(state);
|
||||
//handle the service information elements
|
||||
//Part 1-A Common Air Interface Ver.2.0
|
||||
//6.5.33. Service Information
|
||||
|
|
@ -268,6 +269,8 @@ void nxdn_srv_info_handler (dsd_state * state, uint16_t svc_info)
|
|||
|
||||
void nxdn_rst_info_handler (dsd_state * state, uint32_t rst_info)
|
||||
{
|
||||
UNUSED(state);
|
||||
|
||||
//handle the restriction information elements
|
||||
//Part 1-A Common Air Interface Ver.2.0
|
||||
//6.5.34. Restriction Information
|
||||
|
|
@ -630,6 +633,8 @@ void NXDN_decode_VCALL_ASSGN(dsd_opts * opts, dsd_state * state, uint8_t * Messa
|
|||
|
||||
void NXDN_decode_Alias(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
uint8_t Alias1 = 0x20; //value of an ascii 'space' character
|
||||
uint8_t Alias2 = 0x20;
|
||||
uint8_t Alias3 = 0x20;
|
||||
|
|
@ -1032,6 +1037,7 @@ void NXDN_decode_adj_site(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
|||
|
||||
void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
uint8_t CCOption = 0;
|
||||
uint8_t CallType = 0;
|
||||
|
|
@ -1190,6 +1196,8 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
|||
|
||||
void NXDN_decode_VCALL_IV(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
state->payload_miN = 0; //zero out
|
||||
unsigned long long int IV = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
//P25
|
||||
long int process_channel_to_freq (dsd_opts * opts, dsd_state * state, int channel)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
//RX and SU TX frequencies.
|
||||
//SU RX = (Base Frequency) + (Channel Number) x (Channel Spacing).
|
||||
|
|
@ -61,6 +62,8 @@ long int process_channel_to_freq (dsd_opts * opts, dsd_state * state, int channe
|
|||
|
||||
long int nxdn_channel_to_frequency(dsd_opts * opts, dsd_state * state, uint16_t channel)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
long int freq;
|
||||
long int base = 0;
|
||||
long int step = 0;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
//new p25_lcw function here -- TIA-102.AABF-D LCW Format Messages (if anybody wants to fill the rest out)
|
||||
void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t irrecoverable_errors)
|
||||
{
|
||||
UNUSED(irrecoverable_errors);
|
||||
|
||||
uint8_t lc_format = (uint8_t)ConvertBitIntoBytes(&LCW_bits[0], 8); //format
|
||||
uint8_t lc_opcode = (uint8_t)ConvertBitIntoBytes(&LCW_bits[2], 8); //opcode portion of format
|
||||
uint8_t lc_mfid = (uint8_t)ConvertBitIntoBytes(&LCW_bits[8], 8); //mfid
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ void p2_dibit_buffer (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void process_Frame_Scramble (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED(opts);
|
||||
|
||||
//The bits of the scramble sequence corresponding to signal bits that are not scrambled or not used are discarded.
|
||||
//descramble frame scrambled by LFSR of WACN, SysID, and CC(NAC)
|
||||
unsigned long long int seed = 0;
|
||||
|
|
@ -354,7 +356,9 @@ void process_SACCHs (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
void process_ISCH (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
isch = 0;
|
||||
UNUSED(opts);
|
||||
|
||||
isch = 0;
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
isch = isch << 1;
|
||||
|
|
|
|||
|
|
@ -730,6 +730,8 @@ int verbose_reset_buffer(rtlsdr_dev_t *dev)
|
|||
|
||||
static void optimal_settings(int freq, int rate)
|
||||
{
|
||||
UNUSED(rate);
|
||||
|
||||
// giant ball of hacks
|
||||
// seems unable to do a single pass, 2:1
|
||||
int capture_freq, capture_rate;
|
||||
|
|
@ -908,6 +910,8 @@ static unsigned int chars_to_int(unsigned char* buf) {
|
|||
}
|
||||
|
||||
static void *socket_thread_fn(void *arg) {
|
||||
UNUSED(arg);
|
||||
|
||||
int n;
|
||||
int sockfd;
|
||||
unsigned char buffer[5];
|
||||
|
|
@ -1074,6 +1078,8 @@ void cleanup_rtlsdr_stream()
|
|||
//find way to modify this function to allow hopping (tuning) while squelched and send 0 sample?
|
||||
int get_rtlsdr_sample(int16_t *sample, dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
UNUSED2(opts, state);
|
||||
|
||||
while (output.queue.empty())
|
||||
{
|
||||
struct timespec ts;
|
||||
|
|
|
|||
Loading…
Reference in New Issue