init_input_buf(buf, size);
}
-void breakpoint(void)
+static void breakpoint(void)
{
static int x;
x++;
}
-struct print_arg *alloc_arg(void)
+static struct print_arg *alloc_arg(void)
{
return calloc(1, sizeof(struct print_arg));
}
pevent_find_event_by_name(struct pevent *pevent,
const char *sys, const char *name)
{
- struct event_format *event;
+ struct event_format *event = NULL;
int i;
if (pevent->last_event &&
char format[32];
int show_func;
int len_as_arg;
- int len_arg;
+ int len_arg = 0;
int len;
int ls;
static int migrate_disable_exists;
unsigned int lat_flags;
unsigned int pc;
- int lock_depth;
- int migrate_disable;
+ int lock_depth = 0;
+ int migrate_disable = 0;
int hardirq;
int softirq;
void *data = record->data;
*
* /sys/kernel/debug/tracing/events/.../.../format
*/
-enum pevent_errno __pevent_parse_format(struct event_format **eventp,
+static enum pevent_errno __pevent_parse_format(struct event_format **eventp,
struct pevent *pevent, const char *buf,
unsigned long size, const char *sys)
{
return 0;
}
-int get_field_val(struct trace_seq *s, struct format_field *field,
+static int get_field_val(struct trace_seq *s, struct format_field *field,
const char *name, struct pevent_record *record,
unsigned long long *val, int err)
{
void __warning(const char *fmt, ...);
void __pr_stat(const char *fmt, ...);
-void __vdie(const char *fmt, ...);
-void __vwarning(const char *fmt, ...);
-void __vpr_stat(const char *fmt, ...);
+void __vdie(const char *fmt, va_list ap);
+void __vwarning(const char *fmt, va_list ap);
+void __vpr_stat(const char *fmt, va_list ap);
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
unsigned int type;
unsigned int len;
unsigned int delta;
- unsigned int length;
+ unsigned int length = 0;
void *ptr = kbuf->data + kbuf->curr;
type_len_ts = read_4(kbuf, ptr);
void *kbuffer_read_at_offset(struct kbuffer *kbuf, int offset,
unsigned long long *ts)
{
- void *data;
+ void *data = NULL;
if (offset < kbuf->start)
offset = 0;
FILTER_VAL_TRUE,
};
-void reparent_op_arg(struct filter_arg *parent, struct filter_arg *old_child,
+static void reparent_op_arg(struct filter_arg *parent, struct filter_arg *old_child,
struct filter_arg *arg)
{
- struct filter_arg *other_child;
- struct filter_arg **ptr;
+ struct filter_arg *other_child = NULL;
+ struct filter_arg **ptr = NULL;
if (parent->type != FILTER_ARG_OP &&
arg->type != FILTER_ARG_OP)
free_arg(old_child);
}
-enum filter_vals test_arg(struct filter_arg *parent, struct filter_arg *arg)
+static enum filter_vals test_arg(struct filter_arg *parent, struct filter_arg *arg)
{
enum filter_vals lval, rval;
{
char *lstr;
char *rstr;
- char *op;
+ char *op = NULL;
char *str = NULL;
int len;
#include <stdarg.h>
#include <errno.h>
+#include "event-utils.h"
+
#define __weak __attribute__((weak))
void __vdie(const char *fmt, va_list ap)