From 3ededef53d0704f8b89c55f60bef52a64b86d62c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 18 Jan 2021 09:15:25 -0800 Subject: Static analysis part 1 --- pattern.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pattern.c') diff --git a/pattern.c b/pattern.c index 692deb5..2ec30c0 100644 --- a/pattern.c +++ b/pattern.c @@ -21,6 +21,8 @@ __attribute__((nonnull)) static pat_t *_bp_simplepattern(file_t *f, const char *str); __attribute__((nonnull(1,2,3,6))) static pat_t *new_range(file_t *f, const char *start, const char *end, ssize_t min, ssize_t max, pat_t *repeating, pat_t *sep); +__attribute__((nonnull(1,2))) +static pat_t *bp_simplepattern(file_t *f, const char *str); // // Allocate a new pattern for this file (ensuring it will be automatically @@ -149,7 +151,7 @@ pat_t *chain_together(file_t *f, pat_t *first, pat_t *second) // // Wrapper for _bp_simplepattern() that expands any postfix operators // -pat_t *bp_simplepattern(file_t *f, const char *str) +static pat_t *bp_simplepattern(file_t *f, const char *str) { pat_t *pat = _bp_simplepattern(f, str); if (pat == NULL) return pat; -- cgit v1.2.3