You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/14 14:47:46 UTC

[incubator-nuttx] 03/07: Fix format warn (#96)

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

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

commit b29f5e8cb0e0552d68e5a6228d5c495da442c3bd
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Jan 14 06:41:09 2020 +0800

    Fix format warn (#96)
    
    * fix warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int'
    * fix warning: implicit declaration of function 'up_init_exidx'
---
 binfmt/libelf/libelf_load.c    | 1 +
 net/procfs/netdev_statistics.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/binfmt/libelf/libelf_load.c b/binfmt/libelf/libelf_load.c
index a74ae3f..6460c79 100644
--- a/binfmt/libelf/libelf_load.c
+++ b/binfmt/libelf/libelf_load.c
@@ -51,6 +51,7 @@
 
 #include <nuttx/arch.h>
 #include <nuttx/addrenv.h>
+#include <nuttx/elf.h>
 #include <nuttx/mm/mm.h>
 #include <nuttx/binfmt/elf.h>
 
diff --git a/net/procfs/netdev_statistics.c b/net/procfs/netdev_statistics.c
index cdeb724..a75ee06 100644
--- a/net/procfs/netdev_statistics.c
+++ b/net/procfs/netdev_statistics.c
@@ -538,7 +538,7 @@ static int netprocfs_errors(FAR struct netprocfs_file_s *netfile)
   stats = &dev->d_statistics;
 
   return snprintf(netfile->line, NET_LINELEN , "\tTotal Errors: %08x\n\n",
-                  (unsigned long)stats->errors);
+                  stats->errors);
 }
 #endif /* CONFIG_NETDEV_STATISTICS */