From: mathieu.desnoyers@polymtl.ca (Mathieu Desnoyers)
Subject: [ltt-dev] [UST PATCH] UST-wide warning fixes
Date: Fri, 11 Feb 2011 16:17:06 -0500 [thread overview]
Message-ID: <BLU0-SMTP86D5BB5431FA65FDE0743596EF0@phx.gbl> (raw)
In-Reply-To: <1297458449-25650-1-git-send-email-david.goulet@polymtl.ca>
* David Goulet (david.goulet at polymtl.ca) wrote:
> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
Merged, thanks!
Mathieu
> ---
> libust/buffers.c | 4 ++++
> libust/trace_event.c | 2 +-
> libust/tracectl.c | 2 +-
> libustconsumer/libustconsumer.c | 3 ++-
> snprintf/vfprintf.c | 2 +-
> tests/register_test/register_test.c | 2 +-
> tests/tap.c | 2 +-
> 7 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/libust/buffers.c b/libust/buffers.c
> index 2e6a161..4e8004c 100644
> --- a/libust/buffers.c
> +++ b/libust/buffers.c
> @@ -1243,6 +1243,10 @@ size_t ltt_write_event_header_slow(struct ust_channel *channel,
> case LTT_RFLAG_ID:
> header.id_time = 31 << LTT_TSC_BITS;
> break;
> + default:
> + WARN_ON_ONCE(1);
> + header.id_time = 0;
> + break;
> }
>
> header.id_time |= (u32)tsc & LTT_TSC_MASK;
> diff --git a/libust/trace_event.c b/libust/trace_event.c
> index 76628c5..b54d361 100644
> --- a/libust/trace_event.c
> +++ b/libust/trace_event.c
> @@ -89,7 +89,7 @@ static void trace_event_get_iter(struct trace_event_iter *iter)
> int found = 0;
>
> found = lib_get_iter_trace_events(iter);
> -end:
> +
> if (!found)
> trace_event_iter_reset(iter);
> }
> diff --git a/libust/tracectl.c b/libust/tracectl.c
> index 25fa4d5..25f84cc 100644
> --- a/libust/tracectl.c
> +++ b/libust/tracectl.c
> @@ -828,7 +828,7 @@ static void process_marker_cmd(int sock, int command,
> {
> struct ustcomm_header _reply_header;
> struct ustcomm_header *reply_header = &_reply_header;
> - int result;
> + int result = 0;
>
> memset(reply_header, 0, sizeof(*reply_header));
>
> diff --git a/libustconsumer/libustconsumer.c b/libustconsumer/libustconsumer.c
> index 739a222..25c84ce 100644
> --- a/libustconsumer/libustconsumer.c
> +++ b/libustconsumer/libustconsumer.c
> @@ -445,7 +445,8 @@ static void destroy_buffer(struct ustconsumer_callbacks *callbacks,
>
> int consumer_loop(struct ustconsumer_instance *instance, struct buffer_info *buf)
> {
> - int result, read_result;
> + int result = 0;
> + int read_result;
> char read_buf;
>
> pthread_cleanup_push(decrement_active_buffers, instance);
> diff --git a/snprintf/vfprintf.c b/snprintf/vfprintf.c
> index d4953be..1b8fba6 100644
> --- a/snprintf/vfprintf.c
> +++ b/snprintf/vfprintf.c
> @@ -239,7 +239,7 @@ int ust_safe_vfprintf(LFILE *fp, const char *fmt0, va_list ap)
> int dprec; /* a copy of prec if %[diouxX], 0 otherwise */
> int realsz; /* field size expanded by dprec */
> int size; /* size of converted field or string */
> - const char *xdigs; /* digits for %[xX] conversion */
> + const char *xdigs = NULL; /* digits for %[xX] conversion */
> #define NIOV 8
> struct __suio uio; /* output information: summary */
> struct __siov iov[NIOV];/* ... and individual io vectors */
> diff --git a/tests/register_test/register_test.c b/tests/register_test/register_test.c
> index b593185..d5cd352 100644
> --- a/tests/register_test/register_test.c
> +++ b/tests/register_test/register_test.c
> @@ -55,7 +55,7 @@ void tptest_probe(void *data, int anint)
>
> static void * register_thread_main(void *data)
> {
> - int ret, i, j = 0;
> + int i, j = 0;
>
> struct hello_trace_struct hello[HELLO_LENGTH];
>
> diff --git a/tests/tap.c b/tests/tap.c
> index bd7f81c..a54fd17 100644
> --- a/tests/tap.c
> +++ b/tests/tap.c
> @@ -37,7 +37,7 @@ static void *_tap_comment_stdout(void *_unused)
> if (strncmp(line, "_TAP", 4)) {
> fprintf(normal_stdout, "# %s", line);
> } else {
> - fprintf(normal_stdout, &line[4]);
> + fprintf(normal_stdout, "# %s", &line[4]);
> }
> }
> pthread_exit(0);
> --
> 1.7.4
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
prev parent reply other threads:[~2011-02-11 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 21:07 David Goulet
2011-02-11 21:17 ` Mathieu Desnoyers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLU0-SMTP86D5BB5431FA65FDE0743596EF0@phx.gbl \
--to=mathieu.desnoyers@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox