From: Dave Hibberd Date: Tue, 29 Sep 2026 22:07:51 +0100 Subject: String definition fixes --- ARDOP.c | 6 +++--- ConfigSDR.c | 24 ++++++++++++------------ NodeMapTest.c | 2 +- VARA.c | 2 +- WINMOR.c | 2 +- WinRPRHelper.c | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ARDOP.c b/ARDOP.c index c32ecc2..fcc4e6d 100644 --- a/ARDOP.c +++ b/ARDOP.c @@ -1942,7 +1942,7 @@ static int WebProc(struct TNCINFO * TNC, char * Buff, BOOL LOCAL) int Len = sprintf(Buff, WebProcTemplate, "ARDOP Status"); if (LOCAL) - Len += sprintf(&Buff[Len], Menubit); + Len += sprintf(&Buff[Len], "%s", Menubit); if (TNC->TXFreq) Len += sprintf(&Buff[Len], sliderBit, TNC->TXOffset, TNC->TXOffset); @@ -3656,7 +3656,7 @@ static VOID ARDOPProcessReceivedData(struct TNCINFO * TNC) // May get message split over packets // Data has a length field - // ARQ|FEC|ERR|, 2 byte count (Hex 0001 – FFFF), binary data” + // ARQ|FEC|ERR|, 2 byte count (Hex 0001 � FFFF), binary data� // New standard doesnt have d: if (TNC->DataInputLen > 16000) // Shouldnt have packets longer than this @@ -5724,7 +5724,7 @@ VOID ARDOPSCSPoll(struct TNCINFO * TNC) } } -//0x04421CB0 aa aa 21 00 07 00 06 48 65 6c 6c 6f 0d c8 3e 38 42 50 51 2d 32 20 35 0d 4a 8a 4d 38 42 50 51 ªª!....Hello.È>8BPQ-2 5.JŠM8BPQ +//0x04421CB0 aa aa 21 00 07 00 06 48 65 6c 6c 6f 0d c8 3e 38 42 50 51 2d 32 20 35 0d 4a 8a 4d 38 42 50 51 ��!....Hello.�>8BPQ-2 5.J�M8BPQ //0x04421CCF 2d 31 30 2c 47 4d 38 42 50 51 2d 35 2c 47 4d 38 42 50 51 2c 47 4d 38 42 50 51 2d 31 35 0d 00 -10,GM8BPQ-5,GM8BPQ,GM8BPQ-15.. //0x04421CEE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............................... diff --git a/ConfigSDR.c b/ConfigSDR.c index 5434aac..69bab42 100644 --- a/ConfigSDR.c +++ b/ConfigSDR.c @@ -127,7 +127,7 @@ void main(int argc, char * argv[]) strcat(index, "\r\n"); strcat(line, index); } - fprintf(file, line); + fprintf(file, "%s", line); } fclose(file); @@ -143,46 +143,46 @@ void main(int argc, char * argv[]) { if (ptr = strstr(line, "CABLE-A")) { - printf(line); + printf("%s", line); *ptr = 0; sprintf(index, "%d\r\n", IndexA); strcat(line, index); - printf(line); + printf("%s", line); } if (ptr = strstr(line, "CABLE-B")) { - printf(line); + printf("%s", line); *ptr = 0; sprintf(index, "%d\r\n", IndexB); strcat(line, index); - printf(line); + printf("%s", line); } if (ptr = strstr(line, "CABLE-C")) { - printf(line); + printf("%s", line); *ptr = 0; sprintf(index, "%d\r\n", IndexC); strcat(line, index); - printf(line); + printf("%s", line); } if (ptr = strstr(line, "CABLE-D")) { - printf(line); + printf("%s", line); *ptr = 0; sprintf(index, "%d\r\n", IndexD); strcat(line, index); - printf(line); + printf("%s", line); } if (ptr = strstr(line, "SPEAKERS")) { - printf(line); + printf("%s", line); *ptr = 0; sprintf(index, "%d\r\n", SPEAKERS); strcat(line, index); - printf(line); + printf("%s", line); } - fprintf(file, line); + fprintf(file, "%s", line); } diff --git a/NodeMapTest.c b/NodeMapTest.c index 26fb86f..e1a2c70 100644 --- a/NodeMapTest.c +++ b/NodeMapTest.c @@ -1888,7 +1888,7 @@ void GenerateOutputFiles(time_t Now) if (errFile == NULL) return; - fprintf(errFile, reportHeader); + fprintf(errFile, "%s", reportHeader); activeNodes = 0; diff --git a/VARA.c b/VARA.c index 6db58ef..38f8e84 100644 --- a/VARA.c +++ b/VARA.c @@ -1044,7 +1044,7 @@ static int WebProc(struct TNCINFO * TNC, char * Buff, BOOL LOCAL) int Len = sprintf(Buff, WebProcTemplate, "VARA Status"); if (LOCAL) - Len += sprintf(&Buff[Len], Menubit); + Len += sprintf(&Buff[Len], "%s", Menubit); if (TNC->TXFreq) Len += sprintf(&Buff[Len], sliderBit, TNC->TXOffset, TNC->TXOffset); diff --git a/WINMOR.c b/WINMOR.c index 0c18c08..5008a23 100644 --- a/WINMOR.c +++ b/WINMOR.c @@ -1446,7 +1446,7 @@ static int WebProc(struct TNCINFO * TNC, char * Buff, BOOL LOCAL) int Len = sprintf(Buff, WebProcTemplate, "WINMOR Status"); if (LOCAL) - Len += sprintf(&Buff[Len], Menubit); + Len += sprintf(&Buff[Len], "%s", Menubit); if (TNC->TXFreq) Len += sprintf(&Buff[Len], sliderBit, TNC->TXOffset, TNC->TXOffset); diff --git a/WinRPRHelper.c b/WinRPRHelper.c index bb2b6cd..08fcd46 100644 --- a/WinRPRHelper.c +++ b/WinRPRHelper.c @@ -385,7 +385,7 @@ VOID HAMLIBThread(struct RIGPORTINFO * PORT) if (PORT->remoteSock == INVALID_SOCKET) { i=sprintf(Msg, "Socket Failed for HAMLIB socket - error code = %d\r\n", WSAGetLastError()); - printf(Msg); + printf("%s", Msg); PORT->CONNECTING = FALSE; return; @@ -413,7 +413,7 @@ VOID HAMLIBThread(struct RIGPORTINFO * PORT) sprintf(Msg, "Connect Failed for HAMLIB socket - error code = %d Addr %s\r\n", err, PORT->IOBASE); - printf(Msg); + printf("%s", Msg); PORT->Alerted = TRUE; } @@ -461,7 +461,7 @@ VOID HAMLIBThread(struct RIGPORTINFO * PORT) { Lost: sprintf(Msg, "HAMLIB Connection lost for Addr %s\r\n", PORT->IOBASE); - printf(Msg); + printf("%s", Msg); PORT->CONNECTED = FALSE; PORT->Alerted = FALSE; @@ -480,7 +480,7 @@ Lost: } } sprintf(Msg, "HAMLIB Thread Terminated Addr %s\r\n", PORT->IOBASE); - printf(Msg); + printf("%s", Msg); }