From owner-freebsd-emulation@FreeBSD.ORG Mon Feb 7 22:52:16 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id D8F9A1065670; Mon, 7 Feb 2011 22:52:16 +0000 (UTC) Date: Mon, 7 Feb 2011 22:52:16 +0000 From: Alexander Best To: freebsd-emulation@freebsd.org Message-ID: <20110207225216.GA62134@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline Subject: [patch] comparison of u_long against < 0 in linux32_machdep.c X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 22:52:16 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi there, this was reported by clang 2.9 (dev) as -Wtautological-compare warning. i think clang is right, because linux_iopl_args.level is of type u_long. cheers. alex -- a13x --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="linux32_machdep.c.diff" Index: sys/amd64/linux32/linux32_machdep.c =================================================================== --- sys/amd64/linux32/linux32_machdep.c (revision 218413) +++ sys/amd64/linux32/linux32_machdep.c (working copy) @@ -911,7 +911,7 @@ { int error; - if (args->level < 0 || args->level > 3) + if (args->level > 3) return (EINVAL); if ((error = priv_check(td, PRIV_IO)) != 0) return (error); --envbJBWh7q8WU6mo--