Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
/ readsb Public archive

fix warnings when compiling with gcc8 #14

Merged
merged 1 commit into from
Jun 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mode_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,17 +1623,17 @@ static const char *nav_modes_to_string(nav_modes_t flags) {

buf[0] = 0;
if (flags & NAV_MODE_AUTOPILOT)
strncat(buf, "autopilot ", 10);
strcat(buf, "autopilot ");
if (flags & NAV_MODE_VNAV)
strncat(buf, "vnav ", 6);
strcat(buf, "vnav ");
if (flags & NAV_MODE_ALT_HOLD)
strncat(buf, "althold ", 8);
strcat(buf, "althold ");
if (flags & NAV_MODE_APPROACH)
strncat(buf, "approach ", 9);
strcat(buf, "approach ");
if (flags & NAV_MODE_LNAV)
strncat(buf, "lnav ", 5);
strcat(buf, "lnav ");
if (flags & NAV_MODE_TCAS)
strncat(buf, "tcas ", 5);
strcat(buf, "tcas ");

if (buf[0] != 0)
buf[strlen(buf) - 1] = 0;
Expand Down