Skip to content

Commit 3098948

Browse files
committed
Reduce warning threshold for removing warnings caused by certain strings containing spaces.
1 parent f14c5cb commit 3098948

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libyara/include/yara/limits.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7777
// specify the threshold when calling yr_compiler_set_atom_quality_table
7878
#ifndef YR_ATOM_QUALITY_WARNING_THRESHOLD
7979
#define YR_ATOM_QUALITY_WARNING_THRESHOLD \
80-
(YR_MAX_ATOM_QUALITY - 2 * YR_MAX_ATOM_LENGTH + 4)
80+
(YR_MAX_ATOM_QUALITY - 2 * YR_MAX_ATOM_LENGTH + 3)
8181
#endif
8282

8383

tests/test-rules.c

+5
Original file line numberDiff line numberDiff line change
@@ -1969,6 +1969,11 @@ void test_performance_warnings()
19691969
strings: $a = { 01 02 03 } \
19701970
condition: $a }")
19711971

1972+
assert_no_warnings(
1973+
"rule test { \
1974+
strings: $a = { 20 01 02 } \
1975+
condition: $a }")
1976+
19721977
assert_no_warnings(
19731978
"rule test { \
19741979
strings: $a = { 01 02 } \

0 commit comments

Comments
 (0)