From a8bb7c209207e9203564a03b9b8d4b662cff4e1e Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 15 May 2010 22:28:22 +0000 Subject: Backed-out warning messages (lots). --- main.c | 2 ++ roff.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index cbcc3762..296bb5e6 100644 --- a/main.c +++ b/main.c @@ -789,6 +789,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { static int mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg) { +#if 0 struct curparse *cp; cp = (struct curparse *)arg; @@ -800,5 +801,6 @@ mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg) fprintf(stderr, ": %s", msg); fputc('\n', stderr); +#endif return(1); } diff --git a/roff.c b/roff.c index 3e298ae0..8ed21a8f 100644 --- a/roff.c +++ b/roff.c @@ -349,14 +349,14 @@ roff_new_ig(ROFF_ARGS) * Merry fucking Christmas. */ - r->last->end = malloc((size_t)i - ppos + 1); + r->last->end = malloc((size_t)(i - ppos) + 1); if (NULL == r->last->end) { (*r->msg)(MANDOCERR_MEM, r->data, ln, ppos, NULL); return(ROFF_ERR); } - memcpy(r->last->end, &(*bufp)[ppos], (size_t)i - ppos); - r->last->end[(size_t)i - ppos] = '\0'; + memcpy(r->last->end, &(*bufp)[ppos], (size_t)(i - ppos)); + r->last->end[i - ppos] = '\0'; return(ROFF_IGN); } -- cgit