zhhyu7 opened a new pull request, #4200:
URL: https://github.com/apache/nuttx-apps/pull/4200

   ## Summary
   
   The Paho MQTT C sources trigger -Wmisleading-indentation with clang,
   which breaks builds that use -Werror.  Add the flag only when
   CONFIG_ARCH_TOOLCHAIN_CLANG is set, in both Make and CMake.
   
   ## Impact
   
   - Compiler flags for the third-party Paho sources under clang only.
   
   ## Testing
   
   - sim:dynconns + LIB_MQTT5 + UTILS_MQTT5 with SIM_TOOLCHAIN_CLANG
     (clang 10.0.0): builds on this branch and on apache/master; clang 10
     did not emit the warning, so the flag could not be shown to be needed
     with this compiler.
   - Runtime with gcc, against a minimal MQTT 3.1.1 broker on the host and
     mosquitto_pub/mosquitto_sub:
   
   ```
   mqtt_pub -h 10.0.1.1 -t nuttx/test -m hello-from-nuttx
   mqtt: CONNECT ('10.0.1.2', 8176) b'paho-c-pub'
   mqtt: PUBLISH b'nuttx/test' b'hello-from-nuttx'
   nuttx/test hello-from-nuttx
   mqtt: DISCONNECT ('10.0.1.2', 8176)
   nsh> mqtt_sub -h 10.0.1.1 -t host/test &
   mqtt_sub [11:100]
   nsh> mqtt: CONNECT ('10.0.1.2', 8177) b'paho-c-sub'
   mqtt: SUBSCRIBE b'host/test'
   mqtt: CONNECT ('10.0.1.1', 45002) b''
   mqtt: PUBLISH b'host/test' b'hello-from-host'
   mqtt: DISCONNECT ('10.0.1.1', 45002)
   hello-from-host
   mqtt_pub -h 10.0.1.1 -t nuttx/test -m second -q 1
   mqtt: CONNECT ('10.0.1.2', 8178) b'paho-c-pub'
   mqtt: PUBLISH b'nuttx/test' b'second'
   nuttx/test second
   mqtt: DISCONNECT ('10.0.1.1', 39706)
   mqtt: DISCONNECT ('10.0.1.2', 8178)
   ```
   
   checkpatch.sh -c -u -m -g passes.
   
   
   


-- 
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]

Reply via email to