From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUBNL-0003s4-88 for qemu-devel@nongnu.org; Sat, 07 Mar 2015 04:50:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUBNI-0007Kl-2e for qemu-devel@nongnu.org; Sat, 07 Mar 2015 04:50:27 -0500 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=56889 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUBNH-0007Is-NH for qemu-devel@nongnu.org; Sat, 07 Mar 2015 04:50:23 -0500 Message-ID: <54FAC9DB.4050507@weilnetz.de> Date: Sat, 07 Mar 2015 10:50:19 +0100 From: Stefan Weil MIME-Version: 1.0 References: <54FABF39.4020404@weilnetz.de> In-Reply-To: <54FABF39.4020404@weilnetz.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] clang warnings too noisy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Peter Maydell Cc: qemu-devel Am 07.03.2015 um 10:04 schrieb Stefan Weil: > Am 06.03.2015 um 20:06 schrieb Stefan Hajnoczi: >> 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. >> > > Compilation with different compilers is still very important to detect > hidden bugs. Here is the latest example which I found because of your > e-mail: > > block/iscsi.c:1329:20: warning: comparison of array 'iscsi_url->user' > not equal to a null pointer is always true > [-Wtautological-pointer-compare] > > The code is wrong (I'll send a patch), and the code where it was > copied from is wrong, too (see > https://github.com/sahlberg/libiscsi/pull/146). > > I use clang on Mac from time to time and used it some time ago on Linux. > > Regards > Stefan My clang build (Debian Jessie clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)) just found one more bug and also an unused variable (patches already sent to qemu-devel), therefore yes, we need it. Stefan