Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Mar 2014 00:28:06 +0100
From:      Christian Brueffer <brueffer@FreeBSD.org>
To:        Christoph Mallon <christoph.mallon@gmx.de>, freebsd-bugs@FreeBSD.org,  freebsd-gnats-submit@FreeBSD.org
Subject:   Re: kern/176051: [kernel] [patch] uipc: Simplify and correct debug printing of flags.
Message-ID:  <5317B306.2020404@FreeBSD.org>
In-Reply-To: <531580E4.6060901@gmx.de>
References:  <201402271002.s1RA2NhI087932@freefall.freebsd.org> <531580E4.6060901@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--uTXQmgdEWMt8NaR0n4D1xk0jES7R3G4rg
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 3/4/14 8:29 AM, Christoph Mallon wrote:
> On 27.02.2014 11:02, brueffer@FreeBSD.org wrote:
>> The patch in the PR doesn't compile (latest HEAD).
>=20
>=20
> "doesn't compile" is not helpful feedback.
> Please state at least the error message.
>=20

[...]
cc  -c -O2 -pipe -fno-strict-aliasing  -std=3Dc99 -gdwarf-2 -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs
-fdiagnostics-show-option  -Wno-error-tautological-compare
-Wno-error-empty-body  -Wno-error-parentheses-equality
-Wno-unused-function   -nostdinc  -I. -I/usr/src/sys
-I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx
-mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror
 /usr/src/sys/kern/uipc_debug.c
/usr/src/sys/kern/uipc_debug.c:87:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_DEBUG);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:87:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:87:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_DEBUG);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:88:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_ACCEPTCONN);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:88:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:88:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_ACCEPTCONN);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:89:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_REUSEADDR);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:89:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:89:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_REUSEADDR);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:90:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_KEEPALIVE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:90:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:90:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_KEEPALIVE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:91:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_DONTROUTE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:91:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:91:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_DONTROUTE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:92:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_BROADCAST);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:92:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:92:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_BROADCAST);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:93:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_USELOOPBACK);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:93:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:93:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_USELOOPBACK);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:94:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_LINGER);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:94:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:94:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_LINGER);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:95:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_OOBINLINE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:95:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
/usr/src/sys/kern/uipc_debug.c:95:2: error: format string is not a
string literal (potentially insecure) [-Werror,-Wformat-security]
        PRINT_FLAG(so_options, SO_OOBINLINE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:33: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ^~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:96:2: error: adding 'int' to a string
does not append to the string [-Werror,-Wstring-plus-int]
        PRINT_FLAG(so_options, SO_REUSEPORT);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                ~~~~~~~~~~~^~~~~
/usr/src/sys/kern/uipc_debug.c:96:2: note: use array indexing to silence
this warning
/usr/src/sys/kern/uipc_debug.c:49:44: note: expanded from macro 'PRINT_FL=
AG'
    ((var) & (flag) ? db_printf(", " #flag + sep), (void)(sep =3D 0) :
(void)0)
                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=3D]
20 errors generated.
*** Error code 1


# cc -v
FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 20140216
Target: x86_64-unknown-freebsd11.0
Thread model: posix
Selected GCC installation:


Christian


--uTXQmgdEWMt8NaR0n4D1xk0jES7R3G4rg
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJ8BAEBCgBmBQJTF7MIXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5QzhCQjQ5MDgzNDUwNjkyOUM5Mjg2NDE3
OEM4MzY5ODQ3RTE2NDg3AAoJEHjINphH4WSHy5YP/2uSrj+WrwxrnpP07phJfFlT
wGOOavTUbnviAh2+QzKWRxrG3IrNUT3xo2N7XhBXtaFmriCiO/pn83mKLtEK7FvF
au7n0Nj5iHZjUAFlVAA80isxlZMhHLzk6Hz7JJ6zAq6+rsPyuDNBBgPDA1ye6HIw
2qHeM/GGpizoj5UStXYYwuirLlMEyDlWACZRMS9BrqXGmI2kon98vgdppEX+vaaP
1TxElrBPN2L7uW3B0Ni6L5wfbJT/bjEHe82USY8AD2FH9qSEFquWpo3pT8iBnKz9
sD13ZoFcrlHTzSwJW1+Ma0TBMs/AzDkUh8gMvXLLM4OkDh6PiDSTZ266A89E7nXf
Dw9u+2k/+DdZ19ea6oTSnOt0NilJduli/XS+nkho7Z7bqTNCUbOCA9mpKES2aHdv
+Hsr+zNo6XtUalctpOZDewpvmutML1r56NSE4FhtakbDkhJUIh8+pjL7bPBAnN4/
XKSdlmEMT0srBiS9S492JrbBd8eSfmKXlwIeQ80QaEOv5YC+KqrCorzsFTvP/z8D
GjWvGXoXtJma0ZAXaZW1qDShDFSrW/2NI16KwoxgB8ULsSQVYs4JxiMIsWu428nx
CO4luEEtYU+gFgSePhXoVQNKahcMrbowYFK+mi8xql7TwijMrC6ZPBkDyQ54eeZy
UXuKO8yibqBYYQLarFDE
=E40n
-----END PGP SIGNATURE-----

--uTXQmgdEWMt8NaR0n4D1xk0jES7R3G4rg--



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