Fix-Point commented on code in PR #15936:
URL: https://github.com/apache/nuttx/pull/15936#discussion_r1982569452
##########
libs/libnx/nxfonts/CMakeLists.txt:
##########
@@ -251,5 +251,12 @@ if(CONFIG_NXFONTS)
add_font(tom-thumb-4x6 43)
endif()
+ # Fix -Wshadow warnings for built-in bitops on x86_64
+
+ if(CONFIG_ARCH_X86_64)
+ list(APPEND CFLAGS -fno-builtin-ffs -fno-builtin-ffsl -fno-builtin-ffsll)
+ list(APPEND CFLAGS -fno-builtin-fls -fno-builtin-flsl -fno-builtin-flsll)
Review Comment:
Since NuttX has its own `ffs` and `fls` defined in `lib_ffs.c` and
`lib_fls.c`, I think it might be better to turn off `ffs` and `fls` provided by
the compiler instead of turning them into macro functions, which could lead to
the semantics difference.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]