summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chars.c4
-rw-r--r--html.c4
-rw-r--r--main.c15
-rw-r--r--mandoc.c8
-rw-r--r--mdoc_html.c2
-rw-r--r--roff.c2
-rw-r--r--term.c4
-rw-r--r--term_ascii.c1
-rw-r--r--term_ps.c5
9 files changed, 23 insertions, 22 deletions
diff --git a/chars.c b/chars.c
index b06af83f..17d16850 100644
--- a/chars.c
+++ b/chars.c
@@ -94,13 +94,13 @@ chars_init(enum chars type)
tab = malloc(sizeof(struct tbl));
if (NULL == tab) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
htab = calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
if (NULL == htab) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
for (i = 0; i < LINES_MAX; i++) {
diff --git a/html.c b/html.c
index 8f0b2d65..f2f0c060 100644
--- a/html.c
+++ b/html.c
@@ -116,7 +116,7 @@ ml_alloc(char *outopts, enum htmltype type)
h = calloc(1, sizeof(struct html));
if (NULL == h) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
h->type = type;
@@ -398,7 +398,7 @@ print_otag(struct html *h, enum htmltag tag,
t = malloc(sizeof(struct tag));
if (NULL == t) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
t->tag = tag;
t->next = h->tags.head;
diff --git a/main.c b/main.c
index aaccc399..8a2a1fd2 100644
--- a/main.c
+++ b/main.c
@@ -231,7 +231,7 @@ main(int argc, char *argv[])
switch (c) {
case ('m'):
if ( ! moptions(&curp.inttype, optarg))
- return(MANDOCLEVEL_BADARG);
+ return((int)MANDOCLEVEL_BADARG);
break;
case ('O'):
(void)strlcat(curp.outopts, optarg, BUFSIZ);
@@ -239,11 +239,11 @@ main(int argc, char *argv[])
break;
case ('T'):
if ( ! toptions(&curp, optarg))
- return(MANDOCLEVEL_BADARG);
+ return((int)MANDOCLEVEL_BADARG);
break;
case ('W'):
if ( ! woptions(&curp, optarg))
- return(MANDOCLEVEL_BADARG);
+ return((int)MANDOCLEVEL_BADARG);
break;
case ('V'):
version();
@@ -279,7 +279,7 @@ main(int argc, char *argv[])
if (curp.roff)
roff_free(curp.roff);
- return(exit_status);
+ return((int)exit_status);
}
@@ -288,7 +288,7 @@ version(void)
{
(void)printf("%s %s\n", progname, VERSION);
- exit(MANDOCLEVEL_OK);
+ exit((int)MANDOCLEVEL_OK);
}
@@ -299,7 +299,7 @@ usage(void)
(void)fprintf(stderr, "usage: %s [-V] [-foption] "
"[-mformat] [-Ooption] [-Toutput] "
"[-Werr] [file...]\n", progname);
- exit(MANDOCLEVEL_BADARG);
+ exit((int)MANDOCLEVEL_BADARG);
}
@@ -329,7 +329,7 @@ resize_buf(struct buf *buf, size_t initial)
buf->buf = realloc(buf->buf, buf->sz);
if (NULL == buf->buf) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
}
@@ -809,6 +809,7 @@ mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg)
level = MANDOCLEVEL_FATAL;
while (t < mandoclimits[level])
+ /* LINTED */
level--;
cp = (struct curparse *)arg;
diff --git a/mandoc.c b/mandoc.c
index cd84d400..f0697831 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -233,7 +233,7 @@ mandoc_calloc(size_t num, size_t size)
ptr = calloc(num, size);
if (NULL == ptr) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
return(ptr);
@@ -248,7 +248,7 @@ mandoc_malloc(size_t size)
ptr = malloc(size);
if (NULL == ptr) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
return(ptr);
@@ -262,7 +262,7 @@ mandoc_realloc(void *ptr, size_t size)
ptr = realloc(ptr, size);
if (NULL == ptr) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
return(ptr);
@@ -277,7 +277,7 @@ mandoc_strdup(const char *ptr)
p = strdup(ptr);
if (NULL == p) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
return(p);
diff --git a/mdoc_html.c b/mdoc_html.c
index 93807dd5..32334432 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1183,7 +1183,7 @@ mdoc_bl_pre(MDOC_ARGS)
ord = malloc(sizeof(struct ord));
if (NULL == ord) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
ord->cookie = n;
ord->pos = 1;
diff --git a/roff.c b/roff.c
index 4a323478..c5f15728 100644
--- a/roff.c
+++ b/roff.c
@@ -749,7 +749,6 @@ roff_cond_sub(ROFF_ARGS)
{
enum rofft t;
enum roffrule rr;
- struct roffnode *l;
ppos = pos;
rr = r->last->rule;
@@ -759,7 +758,6 @@ roff_cond_sub(ROFF_ARGS)
* continue.
*/
- l = r->last;
roffnode_cleanscope(r);
if (ROFF_MAX == (t = roff_parse(*bufp, &pos))) {
diff --git a/term.c b/term.c
index 01d9fd54..1e0f0d33 100644
--- a/term.c
+++ b/term.c
@@ -83,7 +83,7 @@ term_alloc(enum termenc enc)
p = calloc(1, sizeof(struct termp));
if (NULL == p) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
p->enc = enc;
@@ -576,7 +576,7 @@ adjbuf(struct termp *p, size_t sz)
p->buf = realloc(p->buf, p->maxcols);
if (NULL == p->buf) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
}
diff --git a/term_ascii.c b/term_ascii.c
index 06d0132b..8be733a6 100644
--- a/term_ascii.c
+++ b/term_ascii.c
@@ -104,6 +104,7 @@ static void
ascii_letter(struct termp *p, char c)
{
+ /* LINTED */
putchar(c);
}
diff --git a/term_ps.c b/term_ps.c
index 198ee5a1..dde4d95e 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -372,7 +372,7 @@ ps_growbuf(struct termp *p, size_t sz)
if (NULL == p->engine.ps.psmarg) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
}
@@ -583,6 +583,7 @@ ps_putchar(struct termp *p, char c)
/* See ps_printf(). */
if ( ! (PS_MARGINS & p->engine.ps.flags)) {
+ /* LINTED */
putchar(c);
p->engine.ps.pdfbytes++;
return;
@@ -609,7 +610,7 @@ pdf_obj(struct termp *p, size_t obj)
p->engine.ps.pdfobjsz * sizeof(size_t));
if (NULL == p->engine.ps.pdfobjs) {
perror(NULL);
- exit(MANDOCLEVEL_SYSERR);
+ exit((int)MANDOCLEVEL_SYSERR);
}
}