xiaoxiang781216 commented on code in PR #10974:
URL: https://github.com/apache/nuttx/pull/10974#discussion_r1364438276


##########
include/sys/endian.h:
##########
@@ -52,15 +52,15 @@
 /* Common byte swapping macros */
 
 #ifdef CONFIG_HAVE_BUILTIN_BSWAP16
-#  define __swap_uint16 __builtin_bswap16
+#  define __swap_uint16(n) ((uint16_t)__builtin_bswap16(n))

Review Comment:
   Since __builtin_bswap16 is provided by compiler implicitly, it's hard to 
know the return type of __builtin_bswap16.



##########
include/sys/endian.h:
##########
@@ -52,15 +52,15 @@
 /* Common byte swapping macros */
 
 #ifdef CONFIG_HAVE_BUILTIN_BSWAP16
-#  define __swap_uint16 __builtin_bswap16
+#  define __swap_uint16(n) ((uint16_t)__builtin_bswap16(n))

Review Comment:
   Since __builtin_bswap16 is provided by compiler implicitly, it's hard to 
know the return type of __builtin_bswapxx.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to