From 6a979016919fc0b494a6f02176fa7ea1df93ad42 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Wed, 22 Jul 2009 17:31:20 +0000 Subject: [PATCH] Sync OpenBSD patchset 153: Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found by lint. --- grid.c | 16 +--------------- log.c | 15 +-------------- status.c | 4 ++-- tmux.h | 4 +--- 4 files changed, 5 insertions(+), 34 deletions(-) diff --git a/grid.c b/grid.c index 970af003..cb97ced1 100644 --- a/grid.c +++ b/grid.c @@ -1,4 +1,4 @@ -/* $Id: grid.c,v 1.27 2009-07-17 12:35:01 nicm Exp $ */ +/* $Id: grid.c,v 1.28 2009-07-22 17:31:20 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -199,20 +199,6 @@ grid_scroll_line(struct grid *gd) gd->hsize++; } -/* Reduce line to fit to cell. */ -void -grid_reduce_line(struct grid *gd, u_int py, u_int sx) -{ - if (sx < gd->size[py]) { - gd->data[py] = xrealloc(gd->data[py], sx, sizeof **gd->data); - gd->size[py] = sx; - } - if (sx < gd->usize[py]) { - gd->udata[py] = xrealloc(gd->udata[py], sx, sizeof **gd->udata); - gd->usize[py] = sx; - } -} - /* Expand line to fit to cell. */ void grid_expand_line(struct grid *gd, u_int py, u_int sx) diff --git a/log.c b/log.c index 7dafce8f..823d00e6 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $Id: log.c,v 1.15 2009-06-25 16:23:35 nicm Exp $ */ +/* $Id: log.c,v 1.16 2009-07-22 17:31:20 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -171,19 +171,6 @@ log_debug2(const char *msg, ...) } } -/* Log a debug message at level 3. */ -void printflike1 -log_debug3(const char *msg, ...) -{ - va_list ap; - - if (log_level > 2) { - va_start(ap, msg); - log_vwrite(LOG_DEBUG, msg, ap); - va_end(ap); - } -} - /* Log a critical error, with error string if necessary, and die. */ __dead void log_vfatal(const char *msg, va_list ap) diff --git a/status.c b/status.c index 9c12537f..35fe5b17 100644 --- a/status.c +++ b/status.c @@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.100 2009-07-20 16:01:07 tcunha Exp $ */ +/* $Id: status.c,v 1.101 2009-07-22 17:31:20 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -350,7 +350,7 @@ status_replace(struct session *s, const char *fmt, time_t t) wl->window->active)); ptr = tmp; } - /* FALLTHOUGH */ + /* FALLTHROUGH */ case 'S': if (ptr == NULL) ptr = s->name; diff --git a/tmux.h b/tmux.h index 66085d58..461f68c9 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.377 2009-07-22 16:55:22 tcunha Exp $ */ +/* $Id: tmux.h,v 1.378 2009-07-22 17:31:20 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1348,7 +1348,6 @@ extern const struct grid_cell grid_default_cell; struct grid *grid_create(u_int, u_int, u_int); void grid_destroy(struct grid *); int grid_compare(struct grid *, struct grid *); -void grid_reduce_line(struct grid *, u_int, u_int); void grid_expand_line(struct grid *, u_int, u_int); void grid_expand_line_utf8(struct grid *, u_int, u_int); void grid_scroll_line(struct grid *); @@ -1602,7 +1601,6 @@ void printflike1 log_warnx(const char *, ...); void printflike1 log_info(const char *, ...); void printflike1 log_debug(const char *, ...); void printflike1 log_debug2(const char *, ...); -void printflike1 log_debug3(const char *, ...); __dead void log_fatal(const char *, ...); __dead void log_fatalx(const char *, ...);