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

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

commit 4432d84dd32b21b0cbeea4b156e4589eb1ae557a
Author: tengshuangshuang <[email protected]>
AuthorDate: Mon Dec 23 19:25:53 2024 +0800

    test:driver_audio bug fix
    
    Signed-off-by: tengshuangshuang <[email protected]>
---
 examples/camera/camera_main.c         | 2 +-
 testing/drivertest/drivertest_audio.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/camera/camera_main.c b/examples/camera/camera_main.c
index 221fa4c4b..43f1fff9d 100644
--- a/examples/camera/camera_main.c
+++ b/examples/camera/camera_main.c
@@ -680,7 +680,7 @@ int main(int argc, FAR char *argv[])
               {
                 gettimeofday(&now, NULL);
                 timersub(&now, &start, &delta);
-                if (timercmp(&delta, &wait, >))
+                if (timercmp(&delta, &wait, > /* For checkpatch */))
                   {
                     printf("Expire time is pasted. GoTo next state.\n");
                     if (app_state == APP_STATE_BEFORE_CAPTURE)
diff --git a/testing/drivertest/drivertest_audio.c 
b/testing/drivertest/drivertest_audio.c
index 2f019fcdd..5ce08329f 100644
--- a/testing/drivertest/drivertest_audio.c
+++ b/testing/drivertest/drivertest_audio.c
@@ -481,7 +481,7 @@ static bool audio_test_timeout(FAR struct audio_state_s 
*state,
 
   gettimeofday(&now, NULL);
   timersub(&now, &start, &delta);
-  return timercmp(&delta, &wait, >);
+  return timercmp(&delta, &wait, > /* For checkpatch */);
 }
 
 static int audio_test_stop(FAR struct audio_state_s *state, int direction)
@@ -741,8 +741,8 @@ static int audio_test_setup(FAR void **audio_state)
   attr.mq_curmsgs = 0;
   attr.mq_flags   = 0;
 
-  snprintf(state->mqname, sizeof(state->mqname), "/tmp/%0lx",
-           (unsigned long)((uintptr_t)state));
+  snprintf(state->mqname, sizeof(state->mqname), "/tmp/%p",
+           ((void *)state));
 
   state->mq = mq_open(state->mqname, O_RDWR | O_CREAT, 0644, &attr);
   assert_false(state->mq < 0);

Reply via email to