mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 14:46:22 +00:00
fix: address PR #98 review feedback
- check-cwe134.sh: match gchar* in addition to char* in variadic pattern - rosterwin.c: merge duplicated if/else into single condition - omemo.c: remove unnecessary scope block and goto, use early return
This commit is contained in:
@@ -72,13 +72,13 @@ echo ""
|
||||
|
||||
KNOWN_RE=$(IFS="|"; echo "${REQUIRED_ATTRIBUTED[*]}")
|
||||
|
||||
# Find variadic declarations with a const char* parameter followed by ...)
|
||||
# Find variadic declarations with a const char* / gchar* parameter followed by ...)
|
||||
# that do NOT have a format attribute on the preceding line
|
||||
NEW_ISSUES=$(grep -B1 -rn --include="*.h" \
|
||||
'const char\s*\*.*,\s*\.\.\.)' "$DIR" 2>/dev/null \
|
||||
'const g\?char\s*\*.*,\s*\.\.\.)' "$DIR" 2>/dev/null \
|
||||
| awk '
|
||||
/format\(printf|G_GNUC_PRINTF/ { skip=1; next }
|
||||
/const char.*,.*\.\.\.\)/ {
|
||||
/const g?char.*,.*\.\.\.\)/ {
|
||||
if (skip) { skip=0; next }
|
||||
print
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user