From 20d624cc7e815ef92d8c20af526ac85ce4042df8 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 17 Jun 2009 14:10:09 +0000 Subject: Lint fixes. --- mdoc_action.c | 6 +++--- mdoc_argv.c | 6 ++---- mdoc_validate.c | 7 +++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/mdoc_action.c b/mdoc_action.c index bcfe939a..da66e739 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.14 2009/06/17 14:08:47 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.15 2009/06/17 14:10:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -666,8 +666,8 @@ post_bl_head(POST_ARGS) for (i = 0, nn = m->last->child; nn; nn = nn->next, i++) /* Count children. */; - n->args->argv[c].sz = i; - n->args->argv[c].value = malloc(i * sizeof(char *)); + n->args->argv[c].sz = (size_t)i; + n->args->argv[c].value = malloc((size_t)i * sizeof(char *)); for (i = 0, nn = m->last->child; nn; i++) { n->args->argv[c].value[i] = nn->string; diff --git a/mdoc_argv.c b/mdoc_argv.c index 833682eb..d873f048 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.7 2009/06/17 14:08:47 kristaps Exp $ */ +/* $Id: mdoc_argv.c,v 1.8 2009/06/17 14:10:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -756,11 +756,9 @@ static int argv_multi(struct mdoc *mdoc, int line, struct mdoc_argv *v, int *pos, char *buf) { - int c, ppos; + int c; char *p; - ppos = *pos; - for (v->sz = 0; ; v->sz++) { if ('-' == buf[*pos]) break; diff --git a/mdoc_validate.c b/mdoc_validate.c index 3111f864..71b9ff27 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.14 2009/06/17 14:08:47 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.15 2009/06/17 14:10:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -802,7 +802,7 @@ pre_display(PRE_ARGS) static int pre_bl(PRE_ARGS) { - int pos, col, type, width, offset; + int pos, type, width, offset; if (MDOC_BLOCK != n->type) return(1); @@ -811,7 +811,7 @@ pre_bl(PRE_ARGS) /* Make sure that only one type of list is specified. */ - type = offset = width = col = -1; + type = offset = width = -1; /* LINTED */ for (pos = 0; pos < (int)n->args->argc; pos++) @@ -840,7 +840,6 @@ pre_bl(PRE_ARGS) if (-1 != type) return(nerr(mdoc, n, EMULTILIST)); type = n->args->argv[pos].arg; - col = pos; break; case (MDOC_Width): if (-1 != width) -- cgit v1.2.3-56-ge451