This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 90676871a paho_mqtt: fix clang compile error
90676871a is described below

commit 90676871a264d2168774dd2fe0271dd0bce0cec7
Author: guoshengyuan3 <[email protected]>
AuthorDate: Mon Oct 26 20:10:24 2026 +0800

    paho_mqtt: fix clang compile error
    
    ../../apps/netutils/paho_mqtt/paho_mqtt/src/WebSocket.c:1035:3: error: 
misleading indentation; statement is not part of the previous 'if' 
[-Werror,-Wmisleading-indentation]
     1035 |                 opcode = WebSocket_OP_BINARY;
          |                 ^
    ../../apps/netutils/paho_mqtt/paho_mqtt/src/WebSocket.c:1030:2: note: 
previous statement is here
     1030 |         if ( in_frames->first )
          |         ^
    
    Signed-off-by: guoshengyuan3 <[email protected]>
    Assisted-by: Kiro:claude-opus-4
---
 netutils/paho_mqtt/CMakeLists.txt | 4 ++++
 netutils/paho_mqtt/Makefile       | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/netutils/paho_mqtt/CMakeLists.txt 
b/netutils/paho_mqtt/CMakeLists.txt
index c97b1359e..aadd1ae05 100644
--- a/netutils/paho_mqtt/CMakeLists.txt
+++ b/netutils/paho_mqtt/CMakeLists.txt
@@ -127,6 +127,10 @@ if(CONFIG_LIB_MQTT5)
 
   target_include_directories(mqtt5 PRIVATE ${MQTT5_INCDIR})
 
+  if(CONFIG_ARCH_TOOLCHAIN_CLANG)
+    target_compile_options(mqtt5 PRIVATE -Wno-misleading-indentation)
+  endif()
+
   target_compile_options(mqtt5 PRIVATE ${MQTT5_FLAGS})
 
   if(CONFIG_LIB_MQTT5_HIGH_PERFORMANCE)
diff --git a/netutils/paho_mqtt/Makefile b/netutils/paho_mqtt/Makefile
index 708e51b9d..ca65a2023 100644
--- a/netutils/paho_mqtt/Makefile
+++ b/netutils/paho_mqtt/Makefile
@@ -72,6 +72,10 @@ ifeq ($(CONFIG_OPENSSL_MBEDTLS_WRAPPER), y)
 SKIP  = $(SRCDIR)/SHA1.c
 endif
 
+ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
+CFLAGS += -Wno-misleading-indentation
+endif
+
 SKIP += $(SRCDIR)/MQTTClient.c
 SKIP += $(SRCDIR)/MQTTVersion.c
 

Reply via email to