git: b8007cfdb72c - main - mididump: fix gcc build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Oct 2024 21:38:19 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b8007cfdb72c1be27d1d93937886fd60f21915ab commit b8007cfdb72c1be27d1d93937886fd60f21915ab Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-10-18 21:38:04 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-10-18 21:38:04 +0000 mididump: fix gcc build --- usr.bin/mididump/mididump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/mididump/mididump.c b/usr.bin/mididump/mididump.c index 9c8fe62c9859..16bd775f10d4 100644 --- a/usr.bin/mididump/mididump.c +++ b/usr.bin/mididump/mididump.c @@ -44,10 +44,10 @@ #define NOTE2FREQ(n) (440 * pow(2.0f, ((float)n - 69) / 12)) #define CHAN_MASK 0x0f -struct note { +static struct note { const char *name; const char *alt; -} static notes[] = { +} notes[] = { { "C", NULL }, { "C#", "Db" }, { "D", NULL }, @@ -211,7 +211,7 @@ main(int argc, char *argv[]) case 0xb0 ... 0xbf: b1 = read_byte(fd); b2 = read_byte(fd); - if (b1 < 0 || b1 > ARRLEN(ctls) - 1) + if (b1 > ARRLEN(ctls) - 1) break; printf("Control/Mode change channel=%d, " "control=%d (%s), value=%d",