You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/10/31 09:31:02 UTC

[incubator-nuttx] branch master updated (6aeeb8a -> 5f7cc04)

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

gustavonihei pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 6aeeb8a  boards/sim/foc: fix configuration
     new 86fc19f  Fix error: 'struct tcb_s' has no member named 'low_priority'
     new 5f7cc04  fs/aio: Fix compile warning

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 fs/aio/aio_read.c            | 1 +
 fs/aio/aio_write.c           | 4 +++-
 libs/libc/aio/lio_listio.c   | 1 +
 sched/sched/sched_sporadic.c | 2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)

[incubator-nuttx] 01/02: Fix error: 'struct tcb_s' has no member named 'low_priority'

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 86fc19ff3f92c2bf5d232d50e6801c9a132293d1
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Oct 30 21:40:12 2021 +0800

    Fix error: 'struct tcb_s' has no member named 'low_priority'
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 sched/sched/sched_sporadic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sched/sched/sched_sporadic.c b/sched/sched/sched_sporadic.c
index 190412d..b6c1792 100644
--- a/sched/sched/sched_sporadic.c
+++ b/sched/sched/sched_sporadic.c
@@ -136,7 +136,7 @@ static int sporadic_set_lowpriority(FAR struct tcb_s *tcb)
        * state.
        */
 
-      tcb->base_priority = tcb->low_priority;
+      tcb->base_priority = sporadic->low_priority;
     }
   else
 #endif

[incubator-nuttx] 02/02: fs/aio: Fix compile warning

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5f7cc0462706bebf7298850bc38f9bf9598a6373
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Oct 30 21:39:46 2021 +0800

    fs/aio: Fix compile warning
    
    aio/lio_listio.c:227:7: warning: implicit declaration of function ‘ferr’ [-Wimplicit-function-declaration]
      227 |       ferr("ERROR: lib_zalloc failed\n");
          |       ^~~~
    aio/lio_listio.c:275:3: warning: implicit declaration of function ‘finfo’ [-Wimplicit-function-declaration]
      275 |   finfo("Registering signal handler\n");
    
    aio/aio_read.c: In function ‘aio_read_worker’:
    aio/aio_read.c:90:11: warning: implicit declaration of function ‘file_pread’; did you mean ‘aio_read’? [-Wimplicit-function-declaration]
       90 |   nread = file_pread(aioc->aioc_filep, (FAR void *)aiocbp->aio_buf,
          |           ^~~~~~~~~~
          |           aio_read
    
    aio/aio_write.c: In function ‘aio_write_worker’:
    aio/aio_write.c:85:12: warning: implicit declaration of function ‘file_fcntl’ [-Wimplicit-function-declaration]
       85 |   oflags = file_fcntl(aioc->aioc_filep, F_GETFL);
          |            ^~~~~~~~~~
    CC:  mmap/fs_mmap.c
    CC:  pthread/pthread_condclockwait.c
    aio/aio_write.c:107:18: warning: implicit declaration of function ‘file_write’; did you mean ‘aio_write’? [-Wimplicit-function-declaration]
      107 |       nwritten = file_write(aioc->aioc_filep,
          |                  ^~~~~~~~~~
          |                  aio_write
    aio/aio_write.c:113:18: warning: implicit declaration of function ‘file_pwrite’; did you mean ‘aio_write’? [-Wimplicit-function-declaration]
      113 |       nwritten = file_pwrite(aioc->aioc_filep,
          |                  ^~~~~~~~~~~
          |                  aio_write
    In file included from aio/aio_write.c:34:
    aio/aio_write.c:121:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
      121 |       ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~
          |                                                     |
          |                                                     ssize_t {aka long int}
    aio/aio_write.c:121:47: note: format string is defined here
      121 |       ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
          |                                              ~^
          |                                               |
          |                                               int
          |                                              %ld
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 fs/aio/aio_read.c          | 1 +
 fs/aio/aio_write.c         | 4 +++-
 libs/libc/aio/lio_listio.c | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/aio/aio_read.c b/fs/aio/aio_read.c
index 0f5fd8a..dad4f0c 100644
--- a/fs/aio/aio_read.c
+++ b/fs/aio/aio_read.c
@@ -31,6 +31,7 @@
 #include <errno.h>
 #include <debug.h>
 
+#include <nuttx/fs/fs.h>
 #include <nuttx/net/net.h>
 
 #include "aio/aio.h"
diff --git a/fs/aio/aio_write.c b/fs/aio/aio_write.c
index 4352754..c09cebc 100644
--- a/fs/aio/aio_write.c
+++ b/fs/aio/aio_write.c
@@ -33,6 +33,8 @@
 #include <errno.h>
 #include <debug.h>
 
+#include <nuttx/fs/fs.h>
+
 #include "aio/aio.h"
 
 #ifdef CONFIG_FS_AIO
@@ -118,7 +120,7 @@ static void aio_write_worker(FAR void *arg)
 
   if (nwritten < 0)
     {
-      ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
+      ferr("ERROR: write/pwrite/send failed: %zd\n", nwritten);
     }
 
   /* Save the result of the write */
diff --git a/libs/libc/aio/lio_listio.c b/libs/libc/aio/lio_listio.c
index 29042f1..35a8d7a 100644
--- a/libs/libc/aio/lio_listio.c
+++ b/libs/libc/aio/lio_listio.c
@@ -28,6 +28,7 @@
 #include <signal.h>
 #include <aio.h>
 #include <assert.h>
+#include <debug.h>
 #include <errno.h>
 
 #include <nuttx/signal.h>