mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-14 23:46:14 +00:00
Add explicit cast to byte_swap_word to resolve implicit conversion issue
warning: implicit conversion loses integer precision: 'int' to 'unsigned short'
This commit is contained in:
parent
f8f7b2ace9
commit
d509224797
@ -16,7 +16,7 @@ static inline unsigned int swapx(unsigned int word) {
|
||||
/* */
|
||||
/****************************************************************/
|
||||
static inline unsigned short byte_swap_word(unsigned short word) {
|
||||
return (((word >> 8) & 0xff) | ((word & 0xff) << 8));
|
||||
return ((word >> 8) | (unsigned short)((word & 0xff) << 8));
|
||||
}
|
||||
|
||||
void byte_swap_page(unsigned short *page, int wordcount);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user