1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-01 17:35:54 +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:
Nick Briggs
2022-08-15 14:40:09 -07:00
parent f8f7b2ace9
commit d509224797

View File

@@ -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);