From owner-freebsd-current@FreeBSD.ORG Tue Oct 1 19:28:41 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE170345 for ; Tue, 1 Oct 2013 19:28:41 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 73D202269 for ; Tue, 1 Oct 2013 19:28:40 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 8B62A7300A; Tue, 1 Oct 2013 21:30:17 +0200 (CEST) Date: Tue, 1 Oct 2013 21:30:17 +0200 From: Luigi Rizzo To: freebsd-current@freebsd.org Subject: CLANG reports an error with %b in printf(9) Message-ID: <20131001193017.GA72967@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2013 19:28:41 -0000 This is on HEAD -- while compiling the kernel with CLANG and slightly higher warns level, i get errors of this kind (in multiple places): /usr/home/luigi/FreeBSD/head/sys/cam/cam_xpt.c:1069:27: error: invalid conversion specifier 'b' [-Werror,-Wformat-invalid-specifier] printf("%s%d: quirks=0x%b\n", periph->periph_name, ~^ /usr/home/luigi/FreeBSD/head/sys/cam/cam_xpt.c:1070:36: error: data argument not used by format string [-Werror,-Wformat-extra-args] periph->unit_number, quirks, bit_string); Does anyone know how hard it is to either disable the warning locally (for a statement, function or file), or better to teach CLANG that printf(9) uses two arguments for %b ? cheers luigi