summaryrefslogtreecommitdiffstats
path: root/preconv.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-26 21:13:07 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-26 21:13:07 +0000
commit7ffcd2ab33874c3e98547e16517172680e9b7217 (patch)
tree7819499c9cf063350a2f90b4c107821a528a1290 /preconv.c
parentcb6de654ba5108e6591f7c7601d03a59019979f7 (diff)
downloadmandoc-7ffcd2ab33874c3e98547e16517172680e9b7217.tar.gz
Some small lint checks in preconv. Also add it to the default lint rule.
Diffstat (limited to 'preconv.c')
-rw-r--r--preconv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/preconv.c b/preconv.c
index 24cd4e19..fcb50790 100644
--- a/preconv.c
+++ b/preconv.c
@@ -137,7 +137,7 @@ conv_utf_8(const struct buf *b)
/* Quick test for big-endian value. */
- if ( ! (*((char *)(&one))))
+ if ( ! (*((const char *)(&one))))
be = 1;
for (i = b->offs; i < b->sz; i++) {
@@ -376,7 +376,7 @@ cue_enc(const struct buf *b, size_t *offs, enum enc *enc)
/* Check us against known encodings. */
- for (i = 0; i < ENC__MAX; i++) {
+ for (i = 0; i < (int)ENC__MAX; i++) {
nsz = strlen(encs[i].name);
if (phsz < nsz)
continue;
@@ -403,7 +403,7 @@ main(int argc, char *argv[])
struct buf b;
const char *fn;
enum enc enc, def;
- const char bom[3] = { 0xEF, 0xBB, 0xBF };
+ unsigned char bom[3] = { 0xEF, 0xBB, 0xBF };
size_t offs;
extern int optind;
extern char *optarg;
@@ -427,12 +427,12 @@ main(int argc, char *argv[])
case ('D'):
/* FALLTHROUGH */
case ('e'):
- for (i = 0; i < ENC__MAX; i++) {
+ for (i = 0; i < (int)ENC__MAX; i++) {
if (strcasecmp(optarg, encs[i].name))
continue;
break;
}
- if (i < ENC__MAX) {
+ if (i < (int)ENC__MAX) {
if ('D' == ch)
def = (enum enc)i;
else