Fix Compiler Warning, minor tweaks
Fix Compiler Warning, minor tweaks to NCurses view and information logging
This commit is contained in:
parent
6afb0d718f
commit
5ee669aa18
|
|
@ -350,7 +350,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||
printw ("| RAN: [%02d] ", rn);
|
||||
printw ("TID: [%04d] ", tgn);
|
||||
//printw ("| RID: [%d] \n", src);
|
||||
printw ("RID: [%04d] \n| ALG: 0x[%02X] KEY 0x[%02X] ", src, state->nxdn_cipher_type, state->nxdn_key);
|
||||
printw ("RID: [%04d] \n| ALG: [0x%02X] KEY [0x%02X] ", src, state->nxdn_cipher_type, state->nxdn_key);
|
||||
if (state->carrier == 1)
|
||||
{
|
||||
printw("%s ", state->nxdn_call_type);
|
||||
|
|
|
|||
|
|
@ -734,12 +734,10 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
|||
}
|
||||
|
||||
/* Print the "Call Type" */
|
||||
//fprintf(stderr, "%s - ", NXDN_Call_Type_To_Str(CallType));
|
||||
fprintf(stderr, "\n %s - ", NXDN_Call_Type_To_Str(CallType)); //line break and 1 space
|
||||
sprintf (state->nxdn_call_type, NXDN_Call_Type_To_Str(CallType)); //fix warning below
|
||||
//sprintf (state->nxdn_call_type, NXDN_Call_Type_To_Str(CallType)); //fix warning below
|
||||
//warning: format not a string literal and no format arguments [-Wformat-security]
|
||||
|
||||
//state->nxdn_call_type = NXDN_Call_Type_To_Str(CallType);
|
||||
sprintf (state->nxdn_call_type, "%s", NXDN_Call_Type_To_Str(CallType)); //fix warning below
|
||||
|
||||
/* Print the "Voice Call Option" */
|
||||
NXDN_Voice_Call_Option_To_Str(VoiceCallOption, DuplexMode, TransmissionMode);
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ processHDU(dsd_opts* opts, dsd_state* state)
|
|||
}
|
||||
|
||||
//if (state->errs == 0 && algidhex != 0x80)
|
||||
if (opts->payload == 1 && state->errs == 0)
|
||||
if (opts->payload == 1)
|
||||
{
|
||||
//fprintf (stderr, " HDU ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi);
|
||||
fprintf (stderr, " HDU ALG ID: 0x%X KEY ID: 0x%X MI: 0x%08llX%08llX%02llX\n", algidhex, kidhex, mihex1, mihex2, mihex3);
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
|||
}
|
||||
|
||||
//if (state->errs == 0 && algidhex != 0x80)
|
||||
if (opts->payload == 1 && state->errs == 0)
|
||||
if (opts->payload == 1)
|
||||
{
|
||||
//fprintf (stderr, " LDU2 ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi);
|
||||
fprintf (stderr, " LDU2 ALG ID: 0x%X KEY ID: 0x%X MI: 0x%08llX%08llX%02llX\n", algidhex, kidhex, mihex1, mihex2, mihex3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue