aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-07 13:20:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-07 13:20:58 +0000
commitd5e33853a27c639beda0a85062ce7db9996e22e1 (patch)
tree6e2bcd44baf1deeb6a5fd52d642aa0ef46d23586
parentcad1b7856f01e0acd83188b5b923676a51f8a891 (diff)
downloadmandoc-d5e33853a27c639beda0a85062ce7db9996e22e1.tar.gz
mandoc-d5e33853a27c639beda0a85062ce7db9996e22e1.tar.zst
mandoc-d5e33853a27c639beda0a85062ce7db9996e22e1.zip
Quiesce lint with some type handling. Does not change anything.
-rw-r--r--man_html.c8
-rw-r--r--mdoc_html.c9
-rw-r--r--tbl_data.c3
-rw-r--r--tbl_opts.c6
-rw-r--r--tbl_term.c21
5 files changed, 25 insertions, 22 deletions
diff --git a/man_html.c b/man_html.c
index 986ded45..da6880a1 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.61 2011/01/04 10:31:15 kristaps Exp $ */
+/* $Id: man_html.c,v 1.62 2011/01/07 13:20:58 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -505,7 +505,6 @@ man_IP_pre(MAN_ARGS)
struct roffsu su;
struct htmlpair tag;
const struct man_node *nn;
- int width;
/*
* This scattering of 1-BU margins and pads is to make sure that
@@ -523,13 +522,12 @@ man_IP_pre(MAN_ARGS)
n->head->child : n->parent->head->child;
SCALE_HS_INIT(&su, INDENT);
- width = 0;
/* Width is the second token. */
if (MAN_IP == n->tok && NULL != nn)
if (NULL != (nn = nn->next))
- width = a2width(nn, &su);
+ a2width(nn, &su);
/* Width is the first token. */
@@ -538,7 +536,7 @@ man_IP_pre(MAN_ARGS)
while (nn && MAN_TEXT != nn->type)
nn = nn->next;
if (nn)
- width = a2width(nn, &su);
+ a2width(nn, &su);
}
if (MAN_BLOCK == n->type) {
diff --git a/mdoc_html.c b/mdoc_html.c
index 52169447..44b41d2f 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.141 2011/01/04 10:29:41 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.142 2011/01/07 13:20:58 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -830,6 +830,7 @@ mdoc_bx_pre(MDOC_ARGS)
return(0);
}
+/* ARGSUSED */
static int
mdoc_it_pre(MDOC_ARGS)
{
@@ -944,7 +945,7 @@ mdoc_it_pre(MDOC_ARGS)
static int
mdoc_bl_pre(MDOC_ARGS)
{
- size_t i;
+ int i;
struct htmlpair tag[3];
struct roffsu su;
char buf[BUFSIZ];
@@ -966,10 +967,10 @@ mdoc_bl_pre(MDOC_ARGS)
* screen and we want to preserve that behaviour.
*/
- for (i = 0; i < n->norm->Bl.ncols; i++) {
+ for (i = 0; i < (int)n->norm->Bl.ncols; i++) {
a2width(n->norm->Bl.cols[i], &su);
bufinit(h);
- if (i < n->norm->Bl.ncols - 1)
+ if (i < (int)n->norm->Bl.ncols - 1)
bufcat_su(h, "width", &su);
else
bufcat_su(h, "min-width", &su);
diff --git a/tbl_data.c b/tbl_data.c
index 49796346..d875f914 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.12 2011/01/07 13:03:48 kristaps Exp $ */
+/* $Id: tbl_data.c,v 1.13 2011/01/07 13:20:58 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -112,6 +112,7 @@ data(struct tbl_node *tbl, struct tbl_span *dp,
return(1);
}
+/* ARGSUSED */
int
tbl_cdata(struct tbl_node *tbl, int ln, const char *p)
{
diff --git a/tbl_opts.c b/tbl_opts.c
index 06338970..b9388676 100644
--- a/tbl_opts.c
+++ b/tbl_opts.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_opts.c,v 1.6 2011/01/06 13:45:47 kristaps Exp $ */
+/* $Id: tbl_opts.c,v 1.7 2011/01/07 13:20:58 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -72,12 +72,12 @@ static const struct tbl_phrase keys[KEY_MAXKEYS] = {
};
static int arg(struct tbl_node *, int,
- const char *, int *, int);
+ const char *, int *, enum tbl_ident);
static void opt(struct tbl_node *, int,
const char *, int *);
static int
-arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key)
+arg(struct tbl_node *tbl, int ln, const char *p, int *pos, enum tbl_ident key)
{
int i;
char buf[KEY_MAXNUMSZ];
diff --git a/tbl_term.c b/tbl_term.c
index baa62456..f4cbcce2 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_term.c,v 1.11 2011/01/05 15:37:23 kristaps Exp $ */
+/* $Id: tbl_term.c,v 1.12 2011/01/07 13:20:58 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -32,7 +32,7 @@
static size_t term_tbl_len(size_t, void *);
static size_t term_tbl_strlen(const char *, void *);
-static void tbl_char(struct termp *, char, int);
+static void tbl_char(struct termp *, char, size_t);
static void tbl_data(struct termp *, const struct tbl *,
const struct tbl_dat *,
const struct roffcol *);
@@ -67,7 +67,7 @@ term_tbl(struct termp *tp, const struct tbl_span *sp)
const struct tbl_head *hp;
const struct tbl_dat *dp;
struct roffcol *col;
- int rmargin, maxrmargin;
+ size_t rmargin, maxrmargin;
rmargin = tp->rmargin;
maxrmargin = tp->maxrmargin;
@@ -165,7 +165,7 @@ tbl_hrule(struct termp *tp, const struct tbl_span *sp)
{
const struct tbl_head *hp;
char c;
- int width;
+ size_t width;
/*
* An hrule extends across the entire table and is demarked by a
@@ -202,7 +202,7 @@ static void
tbl_hframe(struct termp *tp, const struct tbl_span *sp)
{
const struct tbl_head *hp;
- int width;
+ size_t width;
if ( ! (TBL_OPT_BOX & sp->tbl->opts ||
TBL_OPT_DBOX & sp->tbl->opts))
@@ -324,10 +324,13 @@ tbl_vframe(struct termp *tp, const struct tbl *tbl)
}
static void
-tbl_char(struct termp *tp, char c, int len)
+tbl_char(struct termp *tp, char c, size_t len)
{
- int i, sz;
- const char cp[2] = {c, '\0'};
+ size_t i, sz;
+ char cp[2];
+
+ cp[0] = c;
+ cp[1] = '\0';
sz = term_strlen(tp, cp);
@@ -339,7 +342,7 @@ static void
tbl_literal(struct termp *tp, const struct tbl_dat *dp,
const struct roffcol *col)
{
- int padl, padr, ssz;
+ size_t padl, padr, ssz;
enum tbl_cellt pos;
padl = padr = 0;