From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39199 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOSw7-0002Md-Jf for qemu-devel@nongnu.org; Tue, 15 Jun 2010 06:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOSw6-0002I0-Bj for qemu-devel@nongnu.org; Tue, 15 Jun 2010 06:00:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5749) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOSw6-0002GW-5E for qemu-devel@nongnu.org; Tue, 15 Jun 2010 06:00:02 -0400 Message-ID: <4C174F11.1000203@redhat.com> Date: Tue, 15 Jun 2010 11:59:45 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] block: fix a warning and possible truncation References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Blue Swirl , qemu-devel Am 15.06.2010 11:52, schrieb Alexander Graf: > > Am 14.06.2010 um 20:55 schrieb Blue Swirl : > >> Fix a warning from OpenBSD gcc (3.3.5 (propolice)): >> /src/qemu/block.c: In function `bdrv_info_stats_bs': >> /src/qemu/block.c:1548: warning: long long int format, long unsigned >> int arg (arg 6) >> >> There may be also truncation effects. >> >> Signed-off-by: Blue Swirl >> --- >> Alternatively 'ULL' prefix could be appended to BDRV_SECTOR_SIZE >> definition but that may have other side effects. > > ... Which are probably wanted. If there are more truncations, we want > to catch them early, no? Actually, it's there: #define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) That compiler warning doesn't make any sense to me. Kevin