From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTxZa-0003Is-NU for qemu-devel@nongnu.org; Fri, 06 Mar 2015 14:06:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTxZZ-0005jA-OU for qemu-devel@nongnu.org; Fri, 06 Mar 2015 14:06:10 -0500 Received: from mail-ob0-x22f.google.com ([2607:f8b0:4003:c01::22f]:45988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTxZZ-0005j6-Jf for qemu-devel@nongnu.org; Fri, 06 Mar 2015 14:06:09 -0500 Received: by obcuz6 with SMTP id uz6so22485785obc.12 for ; Fri, 06 Mar 2015 11:06:09 -0800 (PST) MIME-Version: 1.0 Date: Fri, 6 Mar 2015 13:06:09 -0600 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] clang warnings too noisy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel Hi Peter, You are rejecting pull requests that produce warnings under clang. clang 3.5.0 on Fedora 21 produces so much noise that it's extremely tedious and error-prone to try finding relevant new warnings. Are you using a different clang version which produces fewer warnings? Is anyone working on making QEMU build cleanly under clang? Under gcc people regularly submit patches to keep the build clean (e.g. recent gcc 5 fixes). Currently I'm not happy wrangling with clang when very few people seem to use it or care enough to make QEMU build cleanly. Examples of noise produced by clang: 1. It complains about glib headers: In file included from /home/stefanha/qemu/include/net/eth.h:32: In file included from /home/stefanha/qemu/include/qemu/iov.h:17: In file included from /home/stefanha/qemu/include/qemu-common.h:43: In file included from /home/stefanha/qemu/include/glib-compat.h:19: In file included from /usr/include/glib-2.0/glib.h:50: In file included from /usr/include/glib-2.0/glib/ghash.h:33: In file included from /usr/include/glib-2.0/glib/glist.h:32: /usr/include/glib-2.0/glib/gmem.h:76:78: warning: unknown attribute '__alloc_size__' ignored [-Wunknown-attributes] gpointer g_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); ^ /usr/include/glib-2.0/glib/gmem.h:78:79: warning: unknown attribute '__alloc_size__' ignored [-Wunknown-attributes] 2. It complains about the 'return !strcmp(s, "?") || !strcmp(s, "help")' in qemu-common.h: /home/stefanha/qemu/include/qemu-common.h:150:1916: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return !__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (s) && __builtin_constant_p ("?") && (__s1_len = strlen (s), __s2_len = strlen ("?"), (!((size_t)(const void *)((s) + 1) - (size_t)(const void *)(s) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("?") + 1) - (size_t)(const void *)("?") == 1) || __s2_len >= 4)) ? __builtin_strcmp (s, "?") : (__builtin_constant_p (s) && ((size_t)(const void *)((s) + 1) - (size_t)(const void *)(s) == 1) && (__s1_len = strlen (s), __s1_len < 4) ? (__builtin_constant_p ("?") && ((size_t)(const void *)(("?") + 1) - (size_t)(const void *)("?") == 1) ? __builtin_strcmp (s, "?") : ... 3. It complains about unused -I paths: clang: warning: argument unused during compilation: '-I /home/stefanha/qemu/tcg' clang: warning: argument unused during compilation: '-I /home/stefanha/qemu/tcg/i386' clang: warning: argument unused during compilation: '-I /home/stefanha/qemu/linux-headers' Stefan