[PATCH] dnd: Use %zd in the format string for size_t types
Kristian Høgsberg
hoegsberg at gmail.com
Mon Oct 29 11:35:12 PDT 2012
On Sun, Oct 28, 2012 at 09:45:37PM -0700, Matt Arsenault wrote:
> Should really use %zu for size_t. %zd is for ssize_t
> On Oct 25, 2012, at 17:15 , Damien Lespiau <damien.lespiau at gmail.com> wrote:
Thanks, committed with Matts change on top.
Kristian
> > From: Damien Lespiau <damien.lespiau at intel.com>
> >
> > len i size_t, so is the result of the sizeof operator.
> > ---
> > clients/dnd.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/clients/dnd.c b/clients/dnd.c
> > index 4c070ff..bbfde09 100644
> > --- a/clients/dnd.c
> > +++ b/clients/dnd.c
> > @@ -517,7 +517,7 @@ dnd_receive_func(void *data, size_t len, int32_t x, int32_t y, void *user_data)
> > if (len == 0) {
> > return;
> > } else if (len != sizeof *message) {
> > - fprintf(stderr, "odd message length %ld, expected %ld\n",
> > + fprintf(stderr, "odd message length %zd, expected %zd\n",
> > len, sizeof *message);
> > return;
> > }
> > --
> > 1.7.7.5
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list