diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-03-24 08:59:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 08:59:59 -0400 |
commit | 0641cc7b36a130111c19c955875862ed989a1beb (patch) | |
tree | 4a9fff406f7a3a95553a34161c6b3b3874790a47 /dist/s_style | |
parent | 1ceddd4a972bf220db9585739e9fcb283d618da4 (diff) | |
download | mongo-0641cc7b36a130111c19c955875862ed989a1beb.tar.gz |
WT-3136 bug fix: WiredTiger doesn't check sprintf calls for error return (#3347)
Add a style check for use of the snprintf/vsnprintf calls rather than
the WiredTiger library replacements.
Fix a wtperf snprintf call I missed.
Diffstat (limited to 'dist/s_style')
-rwxr-xr-x | dist/s_style | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dist/s_style b/dist/s_style index 8e755224ee2..388a481ef56 100755 --- a/dist/s_style +++ b/dist/s_style @@ -93,6 +93,14 @@ else cat $t fi + if ! expr "$f" : 'examples/c/*' > /dev/null && + ! expr "$f" : 'ext/*' > /dev/null && + ! expr "$f" : 'src/os_posix/os_snprintf.c' > /dev/null && + egrep '[^a-z_]snprintf\(|[^a-z_]vsnprintf\(' $f > $t; then + echo "$f: snprintf call, use WiredTiger library replacements" + cat $t + fi + # Alignment directive before "struct". egrep 'WT_COMPILER_TYPE_ALIGN.*struct' $f > $t test -s $t && { |