From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 5 23:28:12 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CE3079C; Wed, 5 Mar 2014 23:28:12 +0000 (UTC) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ABDB2C83; Wed, 5 Mar 2014 23:28:11 +0000 (UTC) Received: from dynamic.1.17.e8edf383af80.685b35818d2c.afb.bredband2.com (dynamic.1.17.e8edf383af80.685b35818d2c.afb.bredband2.com [31.208.68.40]) by mrelayeu.kundenserver.de (node=mreue103) with ESMTP (Nemesis) id 0MeMIx-1WYsRa23UV-00Q8jC; Thu, 06 Mar 2014 00:28:09 +0100 Message-ID: <5317B306.2020404@FreeBSD.org> Date: Thu, 06 Mar 2014 00:28:06 +0100 From: Christian Brueffer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Christoph Mallon , freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/176051: [kernel] [patch] uipc: Simplify and correct debug printing of flags. References: <201402271002.s1RA2NhI087932@freefall.freebsd.org> <531580E4.6060901@gmx.de> In-Reply-To: <531580E4.6060901@gmx.de> X-Enigmail-Version: 1.6 OpenPGP: id=3A67DC36; url=http://people.freebsd.org/~brueffer/brueffer.key.asc Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uTXQmgdEWMt8NaR0n4D1xk0jES7R3G4rg" X-Provags-ID: V02:K0:iuPU0lt2yDAh9aGbm1mwOJAs6CCXJQTGdRq0uUO9uDT fPmOjONgx85o46VSgYGOZ4gJCmjmw6mUHLY0xzw6+LXeciUeP3 tZzheMwe8KeUIxYiwXcVJezmqc5e9UlVGKyIAnMLQjW/xATGzk 044GiuNkEUB3BeTIPXNpYe9LDH6HHaxocea9FWyP/HcNaz35e/ 7DyIs4/vUxIIGfOSp8vG9tsxsWp4Jur5h8K9T4dRAUZQ3N9OE6 MB+5ljA9e/Yhj4PNb8lb52pvaSu1eASeFQ7htgTjPSzRSW346U DyD0Vg/cTFtC00GAa2Dlrn1HpAdT3R+WRCRhEXti0NWMe/m6jH Cma/i+WMxiBKjDMLtPh8c2SLBDAxHcEO0gR3Z0K8ZtwI5iA14x WTGHqIFyf7yfYOQofjaY6t5W14/HNbGZCmeYbnJa4+Hpvh4QnB hxrR/ X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 23:28:12 -0000 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--