Skip to content

Commit 1e40e22

Browse files
committed
posix: Disable more analyzer warnings in regcomp
Changes in ctype.h cause a couple of hard-to-solve analyzer warnings related to regex bracket notation. I poked at it for a few hours and have given up and just disabled the warnings. Signed-off-by: Keith Packard <[email protected]>
1 parent bdf2e11 commit 1e40e22

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

newlib/libc/posix/regcomp.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
#include "cclass.h"
4949
#include "cname.h"
5050

51+
#ifdef __GNUCLIKE_PRAGMA_DIAGNOSTIC
52+
#pragma GCC diagnostic ignored "-Wpragmas"
53+
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
54+
#pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds"
55+
#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
56+
#pragma GCC diagnostic ignored "-Wanalyzer-null-dereference"
57+
#endif
58+
5159
/*
5260
* parse structure, passed up and down to avoid global variables and
5361
* other clumsinesses
@@ -1881,12 +1889,6 @@ computejumps(struct parse *p, struct re_guts *g)
18811889
g->charjump[(unsigned char) g->must[mindex]] = g->mlen - mindex - 1;
18821890
}
18831891

1884-
#ifdef __GNUCLIKE_PRAGMA_DIAGNOSTIC
1885-
#pragma GCC diagnostic ignored "-Wpragmas"
1886-
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
1887-
#pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds"
1888-
#endif
1889-
18901892
/*
18911893
- computematchjumps - compute match jumps for BM scan
18921894
== static void computematchjumps(struct parse *p, struct re_guts *g);

0 commit comments

Comments
 (0)