You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/05/02 14:36:21 UTC

[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1735: apps/netutils/rtptools: fix warning while building with clang

xiaoxiang781216 commented on code in PR #1735:
URL: https://github.com/apache/nuttx-apps/pull/1735#discussion_r1182643700


##########
netutils/rtptools/Makefile:
##########
@@ -28,8 +28,21 @@ RTPTOOLS_SRCDIR   = $(RTPTOOLS_UNPACK)
 DEPPATH += --dep-path $(RTPTOOLS_SRCDIR)
 VPATH   += :$(RTPTOOLS_SRCDIR)
 
-CFLAGS += -Wno-maybe-uninitialized -Wno-strict-prototypes
-CFLAGS += -Wno-unused-function -Wno-format -Wno-shadow
+CFLAGS += -Wno-strict-prototypes -Wno-unused-function -Wno-format -Wno-shadow
+
+# Workaround for clang.
+#
+# error: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Werror,-Wunknown-warning-option]
+# make[3]: *** [multimer.c.Users.runner.work.nuttx.nuttx.sources.apps.netutils.rtptools.o] Error 1
+#
+# It's possible to use only '-Wno-uninitialized' instead, however, it isn't
+# recommended as it could mask erroneous code.
+#
+ifneq ($(shell $(CC) --version | grep clang),)
+CFLAGS += -Wno-uninitialized

Review Comment:
   can we path the source code instead?



-- 
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-unsubscribe@nuttx.apache.org

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