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

Commit

Permalink
Merge pull request #14 from nnathan/gcc8_fix_warning
Browse files Browse the repository at this point in the history
Fix warnings when compiling with gcc8 under Raspian buster.
  • Loading branch information
Mictronics committed Jun 27, 2019
2 parents 8c69975 + e3c3eb8 commit 7df52e3
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 7df52e3

Please sign in to comment.