Browse Source

Remove unused srcpos_warn() function

This function has no users, and we can replace it more generally later.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 11 years ago
parent
commit
6efd9065e6
  1. 17
      srcpos.c
  2. 2
      srcpos.h

17
srcpos.c

@ -312,23 +312,6 @@ srcpos_error(struct srcpos *pos, char const *fmt, ...) @@ -312,23 +312,6 @@ srcpos_error(struct srcpos *pos, char const *fmt, ...)
va_end(va);
}


void
srcpos_warn(struct srcpos *pos, char const *fmt, ...)
{
const char *srcstr;
va_list va;
va_start(va, fmt);

srcstr = srcpos_string(pos);

fprintf(stderr, "Warning: %s ", srcstr);
vfprintf(stderr, fmt, va);
fprintf(stderr, "\n");

va_end(va);
}

void srcpos_set_line(char *f, int l)
{
current_srcfile->name = f;

2
srcpos.h

@ -111,8 +111,6 @@ extern void srcpos_verror(struct srcpos *pos, char const *, va_list va) @@ -111,8 +111,6 @@ extern void srcpos_verror(struct srcpos *pos, char const *, va_list va)
__attribute__((format(printf, 2, 0)));
extern void srcpos_error(struct srcpos *pos, char const *, ...)
__attribute__((format(printf, 2, 3)));
extern void srcpos_warn(struct srcpos *pos, char const *, ...)
__attribute__((format(printf, 2, 3)));

extern void srcpos_set_line(char *f, int l);


Loading…
Cancel
Save