diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-13 14:01:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-13 14:01:21 +0000 |
commit | 2e998575504e6976302c4125100cc35e0817a84e (patch) | |
tree | f663e988381b9860efdb653151001bb971e6bf3b /mdoc_validate.c | |
parent | d64ec3660e67c114d5ff3be37a780cc5d49c118f (diff) | |
download | mandoc-2e998575504e6976302c4125100cc35e0817a84e.tar.gz |
Do not warn about declarations of functions returning function pointers,
getting rid of a false positive noticed by bentley@.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 10a628df..35264a13 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1004,12 +1004,14 @@ post_eoln(POST_ARGS) static int post_fname(POST_ARGS) { - const struct mdoc_node *n; - size_t pos; + const struct mdoc_node *n; + const char *cp; + size_t pos; n = mdoc->last->child; pos = strcspn(n->string, "()"); - if (n->string[pos] != '\0') + cp = n->string + pos; + if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*'))) mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse, n->line, n->pos + pos, n->string); return(1); |