Subject: CVS commit: src/sys/sys
To: None <source-changes@NetBSD.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 09/13/2004 01:24:46
Module Name: src
Committed By: thorpej
Date: Mon Sep 13 01:24:46 UTC 2004
Modified Files:
src/sys/sys: endian.h
Log Message:
To quote C99 6.3.1.1:
If an int can represent all values of the original type, the value is
converted to an int; otherwise, it is converted to an unsigned int. These
are called the integer promotions. 48) All other types are unchanged by
the integer promotions.
So, cast an "unsigned short" to an "unsigned int" before right-shifting it
in order to avoid a lint warning.
To generate a diff of this commit:
cvs rdiff -r1.10 -r1.11 src/sys/sys/endian.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.