Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2025 14:05:08 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: afa1ba3b9c7a - stable/14 - sound tests: Fix gcc build
Message-ID:  <202501281405.50SE58k0020851@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=afa1ba3b9c7a5076f8d981f8491740eed3ad9e78

commit afa1ba3b9c7a5076f8d981f8491740eed3ad9e78
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-01-22 12:09:54 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-01-28 14:04:52 +0000

    sound tests: Fix gcc build
    
    /workspace/src/tests/sys/sound/pcm_read_write.c:36:1: error: 'static' is not
    at beginning of declaration [-Werror=old-style-declaration]
       36 | } static const afmt_tests[] = {
          | ^
    
    Reported by:    CI
    Fixes:          27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    
    (cherry picked from commit f6631da0b581b28c2bfeea1199b52013bb46aa41)
---
 tests/sys/sound/pcm_read_write.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/sys/sound/pcm_read_write.c b/tests/sys/sound/pcm_read_write.c
index 6bdc578615b5..e40ce52b67cc 100644
--- a/tests/sys/sound/pcm_read_write.c
+++ b/tests/sys/sound/pcm_read_write.c
@@ -25,7 +25,7 @@
 #include <dev/sound/pcm/g711.h>
 
 /* Generic test data, with buffer content matching the sample values. */
-struct afmt_test_data {
+static struct afmt_test_data {
 	const char *label;
 	uint8_t buffer[4];
 	size_t size;
@@ -33,7 +33,7 @@ struct afmt_test_data {
 	intpcm_t value;
 	_Static_assert((sizeof(intpcm_t) == 4),
 	    "Test data assumes 32bit, adjust negative values to new size.");
-} static const afmt_tests[] = {
+} const afmt_tests[] = {
 	/* 8 bit sample formats. */
 	{"s8_1", {0x01, 0x00, 0x00, 0x00}, 1, AFMT_S8, 0x00000001},
 	{"s8_2", {0x81, 0x00, 0x00, 0x00}, 1, AFMT_S8, 0xffffff81},



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501281405.50SE58k0020851>