Fix: 32-bit print format type mismatch warnings
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 16 Aug 2012 19:17:11 +0000 (15:17 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 16 Aug 2012 19:36:51 +0000 (15:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c
src/bin/lttng-sessiond/health.c
src/bin/lttng-sessiond/kernel.c
src/bin/lttng-sessiond/main.c
src/common/consumer.c
src/common/kernel-consumer/kernel-consumer.c
src/common/relayd/relayd.c
src/common/ust-consumer/ust-consumer.c

index ae631c70a25afc3407736ea8478f782b2c8793c7..77e314d95771757bd97e14765247752d08242f9b 100644 (file)
@@ -878,7 +878,7 @@ void relay_delete_session(struct relay_command *cmd, struct lttng_ht *streams_ht
                return;
        }
 
-       DBG("Relay deleting session %lu", cmd->session->id);
+       DBG("Relay deleting session %" PRIu64, cmd->session->id);
        free(cmd->session->sock);
 
        rcu_read_lock();
@@ -1030,7 +1030,7 @@ int relay_close_stream(struct lttcomm_relayd_hdr *recv_hdr,
                        &iter);
        node = lttng_ht_iter_get_node_ulong(&iter);
        if (node == NULL) {
-               DBG("Relay stream %lu not found", be64toh(stream_info.stream_id));
+               DBG("Relay stream %" PRIu64 " not found", be64toh(stream_info.stream_id));
                ret = -1;
                goto end_unlock;
        }
@@ -1133,7 +1133,7 @@ struct relay_stream *relay_stream_from_stream_id(uint64_t stream_id,
                        &iter);
        node = lttng_ht_iter_get_node_ulong(&iter);
        if (node == NULL) {
-               DBG("Relay stream %lu not found", stream_id);
+               DBG("Relay stream %" PRIu64 " not found", stream_id);
                ret = NULL;
                goto end;
        }
@@ -1181,7 +1181,7 @@ int relay_recv_metadata(struct lttcomm_relayd_hdr *recv_hdr,
                data_buffer_size = data_size;
        }
        memset(data_buffer, 0, data_size);
-       DBG2("Relay receiving metadata, waiting for %lu bytes", data_size);
+       DBG2("Relay receiving metadata, waiting for %" PRIu64 " bytes", data_size);
        ret = cmd->sock->ops->recvmsg(cmd->sock, data_buffer, data_size,
                        MSG_WAITALL);
        if (ret < 0 || ret != data_size) {
@@ -1235,7 +1235,7 @@ int relay_send_version(struct lttcomm_relayd_hdr *recv_hdr,
                        goto end;
                }
                session->id = ++last_relay_session_id;
-               DBG("Created session %lu", session->id);
+               DBG("Created session %" PRIu64, session->id);
                cmd->session = session;
        }
        session->version_check_done = 1;
@@ -1340,7 +1340,7 @@ int relay_process_data(struct relay_command *cmd, struct lttng_ht *streams_ht)
 
        net_seq_num = be64toh(data_hdr.net_seq_num);
 
-       DBG3("Receiving data of size %u for stream id %zu seqnum %" PRIu64,
+       DBG3("Receiving data of size %u for stream id %" PRIu64 " seqnum %" PRIu64,
                data_size, stream_id, net_seq_num);
        ret = cmd->sock->ops->recvmsg(cmd->sock, data_buffer, data_size, MSG_WAITALL);
        if (ret <= 0) {
@@ -1356,7 +1356,8 @@ int relay_process_data(struct relay_command *cmd, struct lttng_ht *streams_ht)
                ret = -1;
                goto end_unlock;
        }
-       DBG2("Relay wrote %d bytes to tracefile for stream id %lu", ret, stream->stream_handle);
+       DBG2("Relay wrote %d bytes to tracefile for stream id %" PRIu64,
+               ret, stream->stream_handle);
 
        stream->prev_seq = net_seq_num;
 
@@ -1578,7 +1579,7 @@ void *relay_thread_worker(void *data)
                                                        DBG("Control connection closed with %d", pollfd);
                                                } else {
                                                        if (relay_connection->session) {
-                                                               DBG2("Relay worker receiving data for session : %lu",
+                                                               DBG2("Relay worker receiving data for session : %" PRIu64,
                                                                                relay_connection->session->id);
                                                        }
                                                        ret = relay_process_control(&recv_hdr,
index 7bf41c883de16bbea20745f2e4650a5115597e1e..d382c04b536cc060fba5cb181e5e156696264924 100644 (file)
@@ -123,7 +123,7 @@ int health_check_state(struct health_state *state)
        }
 
 end:
-       DBG("Health state current %" PRIu64 ", last %" PRIu64 ", ret %d",
+       DBG("Health state current %lu, last %lu, ret %d",
                        current, last, ret);
 
        return retval;
index 6fce7d84fd01644f99e30b091f61f0edc4890cc2..f734760778db81f24d704f59d416ca7ce68af845 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <common/common.h>
 #include <common/kernel-ctl/kernel-ctl.h>
@@ -150,7 +151,7 @@ int kernel_create_channel(struct ltt_kernel_session *session,
                goto error;
        }
 
-       DBG3("Kernel create channel %s in %s with attr: %d, %zu, %zu, %u, %u, %d",
+       DBG3("Kernel create channel %s in %s with attr: %d, %" PRIu64 ", %" PRIu64 ", %u, %u, %d",
                        chan->name, path, lkc->channel->attr.overwrite,
                        lkc->channel->attr.subbuf_size, lkc->channel->attr.num_subbuf,
                        lkc->channel->attr.switch_timer_interval, lkc->channel->attr.read_timer_interval,
index 92bf85bc6a615ba5aa3face13efe04a534189bb2..2b40e7aec4af9107542a0e4cf91be66db8fed75e 100644 (file)
@@ -4751,7 +4751,7 @@ skip_domain:
                }
 
                /* Receive variable len data */
-               DBG("Receiving %lu URI(s) from client ...", nb_uri);
+               DBG("Receiving %zu URI(s) from client ...", nb_uri);
                ret = lttcomm_recv_unix_sock(sock, uris, len);
                if (ret <= 0) {
                        DBG("No URIs received from client... continuing");
@@ -4811,7 +4811,7 @@ skip_domain:
                        }
 
                        /* Receive variable len data */
-                       DBG("Waiting for %lu URIs from client ...", nb_uri);
+                       DBG("Waiting for %zu URIs from client ...", nb_uri);
                        ret = lttcomm_recv_unix_sock(sock, uris, len);
                        if (ret <= 0) {
                                DBG("No URIs received from client... continuing");
index c1dadddb3dd08854bffd8eef8cca3e9a76e82bed..ea32af463417a81d3eb243ce9c91b0066915d0a0 100644 (file)
@@ -27,6 +27,7 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <common/common.h>
 #include <common/kernel-ctl/kernel-ctl.h>
@@ -1091,7 +1092,7 @@ static int write_relayd_metadata_id(int fd,
                PERROR("write metadata stream id");
                goto end;
        }
-       DBG("Metadata stream id %zu written before data",
+       DBG("Metadata stream id %" PRIu64 " written before data",
                        stream->relayd_stream_id);
 
 end:
@@ -1192,14 +1193,14 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap(
                        }
                        goto end;
                } else if (ret > len) {
-                       PERROR("Error in file write (ret %ld > len %lu)", ret, len);
+                       PERROR("Error in file write (ret %zd > len %lu)", ret, len);
                        written += ret;
                        goto end;
                } else {
                        len -= ret;
                        mmap_offset += ret;
                }
-               DBG("Consumer mmap write() ret %ld (len %lu)", ret, len);
+               DBG("Consumer mmap write() ret %zd (len %lu)", ret, len);
 
                /* This call is useless on a socket so better save a syscall. */
                if (!relayd) {
index f5eb35c31e513e458a69c8d607c26764b916d577..a85dfe0b047089be39cdd0a1d86c99258814f66f 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/mman.h>
 #include <sys/socket.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <unistd.h>
 #include <sys/stat.h>
 
@@ -285,13 +286,14 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
        {
                struct consumer_relayd_sock_pair *relayd;
 
-               DBG("Kernel consumer destroying relayd %zu",
+               DBG("Kernel consumer destroying relayd %" PRIu64,
                                msg.u.destroy_relayd.net_seq_idx);
 
                /* Get relayd reference if exists. */
                relayd = consumer_find_relayd(msg.u.destroy_relayd.net_seq_idx);
                if (relayd == NULL) {
-                       ERR("Unable to find relayd %zu", msg.u.destroy_relayd.net_seq_idx);
+                       ERR("Unable to find relayd %" PRIu64,
+                                       msg.u.destroy_relayd.net_seq_idx);
                        goto end_nosignal;
                }
 
@@ -370,7 +372,7 @@ ssize_t lttng_kconsumer_read_subbuffer(struct lttng_consumer_stream *stream,
                                 * display the error but continue processing to try
                                 * to release the subbuffer
                                 */
-                               ERR("Error splicing to tracefile (ret: %ld != len: %ld)",
+                               ERR("Error splicing to tracefile (ret: %zd != len: %lu)",
                                                ret, len);
                        }
 
index 6f877c96813d8a78b6d5f2f82235b43058d8ed43..7e99dbb674c1c304836fe72727a8fa07e2ee0a61 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <inttypes.h>
 
 #include <common/common.h>
 #include <common/defaults.h>
@@ -196,7 +197,8 @@ int relayd_add_stream(struct lttcomm_sock *sock, const char *channel_name,
                *stream_id = reply.handle;
        }
 
-       DBG("Relayd stream added successfully with handle %zu", reply.handle);
+       DBG("Relayd stream added successfully with handle %" PRIu64,
+               reply.handle);
 
 error:
        return ret;
@@ -306,7 +308,7 @@ int relayd_send_metadata(struct lttcomm_sock *sock, size_t len)
        /* Code flow error. Safety net. */
        assert(sock);
 
-       DBG("Relayd sending metadata of size %lu", len);
+       DBG("Relayd sending metadata of size %zu", len);
 
        /* Send command */
        ret = send_command(sock, RELAYD_SEND_METADATA, NULL, len, 0);
@@ -399,7 +401,7 @@ int relayd_send_close_stream(struct lttcomm_sock *sock, uint64_t stream_id,
        /* Code flow error. Safety net. */
        assert(sock);
 
-       DBG("Relayd closing stream id %zu", stream_id);
+       DBG("Relayd closing stream id %" PRIu64, stream_id);
 
        msg.stream_id = htobe64(stream_id);
        msg.last_net_seq_num = htobe64(last_net_seq_num);
@@ -427,7 +429,7 @@ int relayd_send_close_stream(struct lttcomm_sock *sock, uint64_t stream_id,
                ret = 0;
        }
 
-       DBG("Relayd close stream id %zu successfully", stream_id);
+       DBG("Relayd close stream id %" PRIu64 " successfully", stream_id);
 
 error:
        return ret;
index 486ca26342e57077f4eca2b33e18720932d26686..3024af4a75157b92a46a67014800b9eab66c8e64 100644 (file)
@@ -27,6 +27,7 @@
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <unistd.h>
 
 #include <common/common.h>
@@ -305,7 +306,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                        consumer_add_stream(new_stream);
                }
 
-               DBG("UST consumer_add_stream %s (%d,%d) with relayd id %lu",
+               DBG("UST consumer_add_stream %s (%d,%d) with relayd id %" PRIu64,
                                msg.u.stream.path_name, fds[0], fds[1],
                                new_stream->relayd_stream_id);
                break;
@@ -314,13 +315,13 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
        {
                struct consumer_relayd_sock_pair *relayd;
 
-               DBG("UST consumer destroying relayd %zu",
+               DBG("UST consumer destroying relayd %" PRIu64,
                                msg.u.destroy_relayd.net_seq_idx);
 
                /* Get relayd reference if exists. */
                relayd = consumer_find_relayd(msg.u.destroy_relayd.net_seq_idx);
                if (relayd == NULL) {
-                       ERR("Unable to find relayd %zu", msg.u.destroy_relayd.net_seq_idx);
+                       ERR("Unable to find relayd %" PRIu64, msg.u.destroy_relayd.net_seq_idx);
                        goto end_nosignal;
                }
 
This page took 0.03364 seconds and 4 git commands to generate.