Date: Fri, 16 Dec 2011 11:27:35 +0000 From: Alexander Best <arundel@freebsd.org> To: freebsd-hackers@freebsd.org Subject: Re: strange printf(9) format specifier ("Z") in dev/drm code Message-ID: <20111216112735.GB17565@freebsd.org> In-Reply-To: <20111206215435.GA14529@zim.MIT.EDU> References: <20111204222203.GA8898@freebsd.org> <20111206215435.GA14529@zim.MIT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111216112735.GB17565>