[PATCH] Suppress a warning about mismatched parameter in format string (expected long int, provided unsigned int).

Zephaniah E. Hull warp at aehallh.com
Wed Apr 25 03:17:22 PDT 2007

On Wed, Apr 25, 2007 at 03:06:27AM +0200, Giuseppe Bilotta wrote:
> -            xf86Msg(X_ERROR, "Read error: %s (%d, %d != %ld)\n",
> +            xf86Msg(X_ERROR, "Read error: %s (%d, %d != %u)\n",
>  		    strerror(errno), errno, len, sizeof (ev));

See, this is one of those funky cases where fixing the warning is the
wrong answer.

See, on x86 sizeof returns an int, on amd64 sizeof returns a long, which
makes it slightly harder to avoid a warning on all systems without using
a cast.

Zephaniah E. Hull.

	  1024D/E65A7801 Zephaniah E. Hull <warp at aehallh.com>
	   92ED 94E4 B1E6 3624 226D  5727 4453 008B E65A 7801
	    CCs of replies from mailing lists are requested.

"This system operates under martial law. The constitution is suspended. You
 have no rights except as declared by the area commander. Violators will be
  shot. Repeat violators will be repeatedly shot...."       -from "A_W_O_L"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20070425/7483e84a/attachment.pgp>

More information about the xorg mailing list