From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 16 11:27:35 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 9EB991065675; Fri, 16 Dec 2011 11:27:35 +0000 (UTC) Date: Fri, 16 Dec 2011 11:27:35 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20111216112735.GB17565@freebsd.org> References: <20111204222203.GA8898@freebsd.org> <20111206215435.GA14529@zim.MIT.EDU> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <20111206215435.GA14529@zim.MIT.EDU> Subject: Re: strange printf(9) format specifier ("Z") in dev/drm code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 11:27:35 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue Dec 6 11, David Schultz wrote: > On Sun, Dec 04, 2011, Alexander Best wrote: > > ... i couldn't find a reference to an upercase "Z" in the printf(9) man page. > > i talked to dinoex on #freebsd-clang (EFNet) and he said that the "Z" might > > come from linux'es libc5 and is the equaivalent to glibc's "z". > > > > can we adjust those lines, so the clang warnings disappear? > > Yes, 'Z' is an alias for 'z' that is deprecated in glibc and > unsupported in FreeBSD, so changing the case should fix it. any chance we could get the following patch committed? cheers. alex --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="mga_drv.h.diff" Index: sys/dev/drm/mga_drv.h =================================================================== --- sys/dev/drm/mga_drv.h (revision 228567) +++ sys/dev/drm/mga_drv.h (working copy) @@ -288,7 +288,7 @@ do { \ if ( MGA_VERBOSE ) { \ DRM_INFO( "BEGIN_DMA( %d )\n", (n) ); \ - DRM_INFO( " space=0x%x req=0x%Zx\n", \ + DRM_INFO( " space=0x%x req=0x%zx\n", \ dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \ } \ prim = dev_priv->prim.start; \ @@ -338,7 +338,7 @@ #define DMA_WRITE( offset, val ) \ do { \ if ( MGA_VERBOSE ) { \ - DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04Zx\n", \ + DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04zx\n", \ (u32)(val), write + (offset) * sizeof(u32) ); \ } \ *(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \ --GvXjxJ+pjyke8COw--