Fix new warnings for gcc 8.3.

This commit is contained in:
wb2osz 2019-06-29 10:00:40 -04:00
parent 90921b9376
commit 4c5004b6a1
6 changed files with 12 additions and 12 deletions

View File

@ -400,7 +400,7 @@ long Make_MGRS_String (char* MGRS,
if (Zone) if (Zone)
i = sprintf (MGRS+i,"%2.2ld",Zone); i = sprintf (MGRS+i,"%2.2ld",Zone);
else else
strncpy(MGRS, " ", 2); // 2 spaces strcpy(MGRS, " "); // 2 spaces - Should i be set to 2?
for (j=0;j<3;j++) for (j=0;j<3;j++)
MGRS[i++] = alphabet[Letters[j]]; MGRS[i++] = alphabet[Letters[j]];

View File

@ -367,7 +367,7 @@ long Make_USNG_String (char* USNG,
if (Zone) if (Zone)
i = sprintf (USNG+i,"%2.2ld",Zone); i = sprintf (USNG+i,"%2.2ld",Zone);
else else
strncpy(USNG, " ", 2); // 2 spaces strcpy(USNG, " "); // 2 spaces - Should i be set to 2?
for (j=0;j<3;j++) for (j=0;j<3;j++)
USNG[i++] = alphabet[Letters[j]]; USNG[i++] = alphabet[Letters[j]];

View File

@ -1863,7 +1863,7 @@ static void maybe_xmit_packet_from_igate (char *message, int to_chan)
* -> Raise the rate limiting value. * -> Raise the rate limiting value.
*/ */
if (ig_to_tx_allow (pp3, to_chan)) { if (ig_to_tx_allow (pp3, to_chan)) {
char radio [500]; char radio [2400];
packet_t pradio; packet_t pradio;
snprintf (radio, sizeof(radio), "%s>%s%d%d%s:}%s", snprintf (radio, sizeof(radio), "%s>%s%d%d%s:}%s",

View File

@ -774,7 +774,7 @@ void kiss_process_msg (unsigned char *kiss_msg, int kiss_len, int debug, int cli
printf ("ERROR - Invalid KISS data frame from TNC.\n"); printf ("ERROR - Invalid KISS data frame from TNC.\n");
} }
else { else {
char prefix[100]; // Channel and optional timestamp. char prefix[120]; // Channel and optional timestamp.
// Like [0] or [2 12:34:56] // Like [0] or [2 12:34:56]
char addrs[AX25_MAX_ADDRS*AX25_MAX_ADDR_LEN]; // Like source>dest,digi,...,digi: char addrs[AX25_MAX_ADDRS*AX25_MAX_ADDR_LEN]; // Like source>dest,digi,...,digi:

View File

@ -325,10 +325,10 @@ static void read_csv(FILE *fp)
things[num_things].speed = speed; things[num_things].speed = speed;
things[num_things].course = course; things[num_things].course = course;
things[num_things].alt = alt; things[num_things].alt = alt;
strncpy (things[num_things].time, pisotime, sizeof(things[num_things].time)); strlcpy (things[num_things].time, pisotime, sizeof(things[num_things].time));
strncpy (things[num_things].name, pname, sizeof(things[num_things].name)); strlcpy (things[num_things].name, pname, sizeof(things[num_things].name));
strncpy (things[num_things].desc, desc, sizeof(things[num_things].desc)); strlcpy (things[num_things].desc, desc, sizeof(things[num_things].desc));
strncpy (things[num_things].comment, comment, sizeof(things[num_things].comment)); strlcpy (things[num_things].comment, comment, sizeof(things[num_things].comment));
num_things++; num_things++;
} }

View File

@ -243,9 +243,9 @@ static void mheard_dump (void)
int i; int i;
mheard_t *mptr; mheard_t *mptr;
time_t now = time(NULL); time_t now = time(NULL);
char stuff[80]; char stuff[120];
char rf[16]; // hours:minutes char rf[20]; // hours:minutes
char is[16]; char is[20];
char position[40]; char position[40];
mheard_t *station[MAXDUMP]; mheard_t *station[MAXDUMP];
int num_stations = 0; int num_stations = 0;