UST-wide warning fixes
authorDavid Goulet <david.goulet@polymtl.ca>
Fri, 11 Feb 2011 21:16:11 +0000 (16:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 11 Feb 2011 21:16:11 +0000 (16:16 -0500)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libust/buffers.c
libust/trace_event.c
libust/tracectl.c
libustconsumer/libustconsumer.c
snprintf/vfprintf.c
tests/register_test/register_test.c
tests/tap.c

index 2e6a16181c25ceea46a8ba031eaa87037dfb6352..4e8004c65e042d73e70bb175874fd279d10ab29c 100644 (file)
@@ -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;
index 76628c55bc9933667e7a8be778f8ee6b2b0bc259..b54d361f2ae170e2bb64645b80ead4e51f149824 100644 (file)
@@ -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);
 }
index 25fa4d57ecde33954791d2bca5a21a4639af9a2d..25f84ccd0f033f2ec4ec38f40a589dae6cb05bc2 100644 (file)
@@ -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));
 
index 739a22235198c2cc67668c029738c3baf41ac542..25c84ce0c48d36b20ef6369e8f0a60d5a2508293 100644 (file)
@@ -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);
index d4953be28dca8f60024efabacda83e14cba4c157..1b8fba6721a8d1af6ed806959c1f2daf11c5d8e3 100644 (file)
@@ -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 */
index b593185e707f8d4c0f1cef55110f8453cda820b5..d5cd352afeaadd3362ab338d4e93d4479440c3c8 100644 (file)
@@ -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];
 
index bd7f81cc1eeeb61f455e8c756610e04b0a6d9acb..a54fd178d12f96cf9a32ac591754526c4149e4b4 100644 (file)
@@ -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);
This page took 0.028841 seconds and 4 git commands to generate.