[PATCH] libdl/rtl-obj-cache.c: Change format specifiers to fix warnings

Gedare Bloom gedare at rtems.org
Thu Apr 6 17:27:42 UTC 2017


Hello Cillian,

Please send patches preferably with the git-send-email command. It
takes a bit of work to configure it properly. There are instructions
on our wiki for gmail:
https://devel.rtems.org/wiki/Developer/Git/Users#SubmittingaPatch

On Thu, Apr 6, 2017 at 11:51 AM, Cillian O'Donnell
<cpodonnell8 at gmail.com> wrote:
> This get rid of 4 warnings. Tested on m68k-gen68340(32 bit) and
> sparc64-niagara(64 bit). Let me know if this is ok.
>
> diff --git a/cpukit/libdl/rtl-obj-cache.c b/cpukit/libdl/rtl-obj-cache.c
> index a4676cf..912689d 100644
> --- a/cpukit/libdl/rtl-obj-cache.c
> +++ b/cpukit/libdl/rtl-obj-cache.c
> @@ -78,11 +78,11 @@ 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=%d length=%d area=[%d,%d]
> cache=[%d,%d] size=%d\n",
> -            fd, cache->fd, (int) offset, (int) *length,
> -            (int) offset, (int) offset + *length,
> -            (int) cache->offset, (int) cache->offset + cache->level,
> -            (int) cache->file_size);
> +    printf ("rtl: cache: %2d: fd=%d offset=%llu length=%d area=[%d,%llu]
> cache=[%llu,%llu] size=%lu\n",
> +            fd, cache->fd, offset, (int) *length,
> +            (int) offset, offset + *length,
> +            cache->offset, cache->offset + cache->level,
> +            cache->file_size);
>
>    if (*length > cache->size)
>    {
> @@ -172,10 +172,10 @@ rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t*
> cache,
>      }
>
>      if (rtems_rtl_trace (RTEMS_RTL_TRACE_CACHE))
> -      printf ("rtl: cache: %2d: seek: offset=%d buffer_offset=%d read=%d
> cache=[%d,%d] dist=%d\n",
> -              fd, (int) offset + buffer_offset, (int) buffer_offset, (int)
> buffer_read,
> -              (int) offset, (int) offset + buffer_read,
> -              (int) (cache->file_size - offset));
> +      printf ("rtl: cache: %2d: seek: offset=%llu buffer_offset=%lu read=%d
> cache=[%d,%llu] dist=%llu\n",
> +              fd, offset + buffer_offset, buffer_offset, (int) buffer_read,
> +              (int) offset, offset + buffer_read,
> +              (cache->file_size - offset));
>
>      if (lseek (fd, offset + buffer_offset, SEEK_SET) < 0)
>      {
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list