[rtems commit] libdl/rtl-obj-cache.c: Use PRIdoff_t to avoid printf() format warnings on some architectures

Joel Sherrill joel at rtems.org
Mon Apr 24 22:21:55 UTC 2017


Module:    rtems
Branch:    master
Commit:    3144292b2743dc6c1685d97dd4a9100bb3a3c0b3
Changeset: http://git.rtems.org/rtems/commit/?id=3144292b2743dc6c1685d97dd4a9100bb3a3c0b3

Author:    Joel Sherrill <joel at rtems.org>
Date:      Mon Apr 24 11:18:47 2017 -0500

libdl/rtl-obj-cache.c: Use PRIdoff_t to avoid printf() format warnings on some architectures

---

 cpukit/libdl/rtl-obj-cache.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpukit/libdl/rtl-obj-cache.c b/cpukit/libdl/rtl-obj-cache.c
index c859f60..ba9d3bb 100644
--- a/cpukit/libdl/rtl-obj-cache.c
+++ b/cpukit/libdl/rtl-obj-cache.c
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
+#include <rtems/inttypes.h>
 
 #include <rtems/rtl/rtl-allocator.h>
 #include "rtl-obj-cache.h"
@@ -79,8 +80,8 @@ rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t* cache,
   struct stat sb;
 
   if (rtems_rtl_trace (RTEMS_RTL_TRACE_CACHE))
-    printf ("rtl: cache: %2d: fd=%d offset=%" PRIdMAX "length=%zu area=[%"
-            PRIdMAX ",%" PRIdMAX "] cache=[%" PRIdMAX ",%" PRIdMAX "] size=%zu\n",
+    printf ("rtl: cache: %2d: fd=%d offset=%" PRIdoff_t "length=%zu area=[%"
+            PRIdoff_t ",%" PRIdoff_t "] cache=[%" PRIdoff_t ",%" PRIdoff_t "] size=%zu\n",
             fd, cache->fd, offset, *length,
             offset, offset + *length,
             cache->offset, cache->offset + cache->level,




More information about the vc mailing list