Fix: incorrect conversion specifier used with size and padding
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 12:47:40 +0000 (08:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 12:50:05 +0000 (08:50 -0400)
packet>size and padding_len, of type size_t, are logged using a
%PRIu64 specifier resulting in a warning being emitted on 32-bit
architectures.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/stream.c

index 5af870d36fc4af2bcd708d461ad7bcdb13ea7447..efe132d1cbdebf27f943b7f5f0aa28ff3c6e68f7 100644 (file)
@@ -1000,10 +1000,10 @@ int stream_write(struct relay_stream *stream,
                stream->metadata_received += packet->size + padding_len;
        }
 
-       DBG("Wrote to %sstream %" PRIu64 ": data_length = %" PRIu64 ", padding_length = %" PRIu64,
+       DBG("Wrote to %sstream %" PRIu64 ": data_length = %zu, padding_length = %zu",
                        stream->is_metadata ? "metadata " : "",
                        stream->stream_handle,
-                       packet ? packet->size : 0, padding_len);
+                       packet ? packet->size : (size_t) 0, padding_len);
 end:
        return ret;
 }
This page took 0.025906 seconds and 4 git commands to generate.