* mdocml: Make lint shut up a little bit.
@ 2011-03-15 16:23 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-03-15 16:23 UTC (permalink / raw)
To: source
Log Message:
-----------
Make lint shut up a little bit.
Modified Files:
--------------
mdocml:
eqn.c
html.c
main.c
mandoc.c
mdoc_validate.c
out.c
roff.c
tbl_data.c
tbl_opts.c
term.c
Revision Data
-------------
Index: term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -Lterm.c -Lterm.c -u -p -r1.177 -r1.178
--- term.c
+++ term.c
@@ -514,7 +514,7 @@ term_word(struct termp *p, const char *w
if ((ssz = strcspn(word, "\\")) > 0)
encode(p, word, ssz);
- word += ssz;
+ word += (int)ssz;
if ('\\' != *word)
continue;
Index: mandoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Lmandoc.c -Lmandoc.c -u -p -r1.38 -r1.39
--- mandoc.c
+++ mandoc.c
@@ -354,7 +354,7 @@ mandoc_getarg(char **cpp, mandocmsg msg,
while (' ' == *cp)
cp++;
}
- *pos += (cp - start) + (quoted ? 1 : 0);
+ *pos += (int)(cp - start) + (quoted ? 1 : 0);
*cpp = cp;
if ('\0' == *cp && msg && (white || ' ' == cp[-1]))
Index: html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -Lhtml.c -Lhtml.c -u -p -r1.126 -r1.127
--- html.c
+++ html.c
@@ -214,7 +214,7 @@ print_gen_head(struct html *h)
}
}
-
+/* ARGSUSED */
static void
print_num(struct html *h, const char *p, size_t len)
{
@@ -224,7 +224,6 @@ print_num(struct html *h, const char *p,
if (rhs)
putchar((int)*rhs);
}
-
static void
print_spec(struct html *h, enum roffdeco d, const char *p, size_t len)
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -Lroff.c -Lroff.c -u -p -r1.126 -r1.127
--- roff.c
+++ roff.c
@@ -600,7 +600,7 @@ roff_parse(struct roff *r, const char *b
t = (r->current_string = roff_getstrn(r, mac, maclen))
? ROFF_USERDEF : roff_hash_find(mac, maclen);
- *pos += maclen;
+ *pos += (int)maclen;
while (buf[*pos] && ' ' == buf[*pos])
(*pos)++;
@@ -1137,7 +1137,7 @@ roff_rm(ROFF_ARGS)
cp = *bufp + pos;
while ('\0' != *cp) {
- name = roff_getname(r, &cp, ln, cp - *bufp);
+ name = roff_getname(r, &cp, ln, (int)(cp - *bufp));
if ('\0' != *name)
roff_setstr(r, name, NULL, 0);
}
@@ -1372,7 +1372,7 @@ roff_setstr(struct roff *r, const char *
* One additional byte for the '\n' in multiline mode,
* and one for the terminating '\0'.
*/
- newch = strlen(string) + (multiline ? 2 : 1);
+ newch = strlen(string) + (multiline ? 2u : 1u);
if (NULL == n->string) {
n->string = mandoc_malloc(newch);
*n->string = '\0';
@@ -1383,7 +1383,7 @@ roff_setstr(struct roff *r, const char *
}
/* Skip existing content in the destination buffer. */
- c = n->string + oldch;
+ c = n->string + (int)oldch;
/* Append new content to the destination buffer. */
while (*string) {
Index: main.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/main.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -Lmain.c -Lmain.c -u -p -r1.149 -r1.150
--- main.c
+++ main.c
@@ -806,7 +806,7 @@ rerun:
pos = 0;
continue;
case (ROFF_APPEND):
- pos = strlen(ln.buf);
+ pos = (int)strlen(ln.buf);
continue;
case (ROFF_RERUN):
goto rerun;
Index: eqn.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/eqn.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Leqn.c -Leqn.c -u -p -r1.2 -r1.3
--- eqn.c
+++ eqn.c
@@ -65,6 +65,7 @@ eqn_alloc(int pos, int line)
return(p);
}
+/* ARGSUSED */
void
eqn_end(struct eqn_node *e)
{
Index: out.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/out.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -Lout.c -Lout.c -u -p -r1.37 -r1.38
--- out.c
+++ out.c
@@ -431,7 +431,8 @@ tblcalc(struct rofftbl *tbl, const struc
*/
assert(NULL == tbl->cols);
- tbl->cols = calloc(sp->tbl->cols, sizeof(struct roffcol));
+ tbl->cols = calloc
+ ((size_t)sp->tbl->cols, sizeof(struct roffcol));
hp = sp->head;
Index: tbl_data.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_data.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Ltbl_data.c -Ltbl_data.c -u -p -r1.22 -r1.23
--- tbl_data.c
+++ tbl_data.c
@@ -106,8 +106,10 @@ data(struct tbl_node *tbl, struct tbl_sp
return(0);
}
- dat->string = mandoc_malloc(*pos - sv + 1);
- memcpy(dat->string, &p[sv], *pos - sv);
+ assert(*pos - sv >= 0);
+
+ dat->string = mandoc_malloc((size_t)(*pos - sv + 1));
+ memcpy(dat->string, &p[sv], (size_t)(*pos - sv));
dat->string[*pos - sv] = '\0';
if (p[*pos])
Index: tbl_opts.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_opts.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Ltbl_opts.c -Ltbl_opts.c -u -p -r1.8 -r1.9
--- tbl_opts.c
+++ tbl_opts.c
@@ -188,7 +188,7 @@ again: /*
/* Copy up to first non-alpha character. */
for (sv = *pos, i = 0; i < KEY_MAXNAME; i++, (*pos)++) {
- buf[i] = tolower((unsigned char)p[*pos]);
+ buf[i] = (char)tolower((unsigned char)p[*pos]);
if ( ! isalpha((unsigned char)buf[i]))
break;
}
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.158 -r1.159
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -2127,7 +2127,8 @@ post_bx(POST_ARGS)
n = mdoc->last->child;
if (n && NULL != (n = n->next))
- *n->string = toupper((unsigned char)*n->string);
+ *n->string = (char)toupper
+ ((unsigned char)*n->string);
return(1);
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-15 16:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 16:23 mdocml: Make lint shut up a little bit kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).