From owner-svn-src-head@FreeBSD.ORG Fri Mar 9 16:39:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3EFB106566B; Fri, 9 Mar 2012 16:39:34 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F62F8FC0C; Fri, 9 Mar 2012 16:39:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29GdYms015759; Fri, 9 Mar 2012 16:39:34 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29GdYIl015757; Fri, 9 Mar 2012 16:39:34 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203091639.q29GdYIl015757@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 9 Mar 2012 16:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232730 - head/sys/x86/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 16:39:34 -0000 Author: tijl Date: Fri Mar 9 16:39:34 2012 New Revision: 232730 URL: http://svn.freebsd.org/changeset/base/232730 Log: Cast the expression in __bswap16(x) to __uint16_t because it is promoted to int. Reviewed by: dim Modified: head/sys/x86/include/endian.h Modified: head/sys/x86/include/endian.h ============================================================================== --- head/sys/x86/include/endian.h Fri Mar 9 16:21:40 2012 (r232729) +++ head/sys/x86/include/endian.h Fri Mar 9 16:39:34 2012 (r232730) @@ -70,8 +70,8 @@ (((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32)) #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P -#define __bswap16(x) \ - (__builtin_constant_p(x) ? \ +#define __bswap16(x) \ + (__uint16_t)(__builtin_constant_p(x) ? \ __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)) #define __bswap32(x) \ (__builtin_constant_p(x) ? \