// TODO: Move fatal() to bpfinterp.h and replace abort() calls in the interpreter.
// TODO: Add warn() option.
-static void __attribute__((noreturn))
+static void __attribute__((noreturn)) __attribute__ ((format (printf, 1, 2)))
fatal(const char *str, ...)
{
if (module_name)
if (syms[i].st_name < str_data->d_size)
name = static_cast<char *>(str_data->d_buf) + syms[i].st_name;
else
- fatal("symbol %u has invalid string index\n", i);
+ fatal("symbol %zu has invalid string index\n", i);
maybe_collect_kprobe(name, i, syms[i].st_shndx, syms[i].st_value);
}
}
static int use_syslog = 0;
+ __attribute__ ((format (printf, 1, 2)))
void eprintf(const char *fmt, ...)
{
va_list va;
char *seq = parse_stap_color(type);
if (seq != NULL) {
eprintf("\033[");
- eprintf(seq);
+ eprintf("%s", seq);
eprintf("m\033[K");
free(seq);
}
void kprobe_derived_probe::printsig (ostream& o) const
{
- bool nest = true;
sole_location()->print (o);
o << " /* " << " name = " << symbol_name << "*/";
-
- if (nest)
- printsig_nested (o);
+ printsig_nested (o);
}
void kprobe_derived_probe::join_group (systemtap_session& s)