Skip to content

Commit 4f4608e

Browse files
committed
Got rid of several warnigs during compilation.
Changed regex_start.sh to start hscollider from the default directory for apps.
1 parent ab68ff0 commit 4f4608e

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

regex/hwlm/noodle_engine_avx2.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,17 @@ hwlm_error_t scanSingleShort(const struct noodTable *n, const u8 *buf,
114114
}
115115

116116
m256 v;
117-
118117
if (l < 4) {
119118
u8 *vp = (u8*)&v;
120119
switch (l) {
121-
case 3: vp[2] = d[2]; // fallthrough
122-
case 2: vp[1] = d[1]; // fallthrough
123-
case 1: vp[0] = d[0]; // fallthrough
120+
case 3:
121+
vp[2] = d[2]; // fallthrough
122+
fallthrough;
123+
case 2:
124+
vp[1] = d[1]; // fallthrough
125+
fallthrough;
126+
case 1:
127+
vp[0] = d[0]; // fallthrough
124128
}
125129
} else {
126130
v = masked_move256_len(d, l);
@@ -154,16 +158,23 @@ hwlm_error_t scanDoubleShort(const struct noodTable *n, const u8 *buf,
154158
m256 v;
155159

156160
DEBUG_PRINTF("d %zu\n", d - buf);
161+
157162
if (l < 4) {
158163
u8 *vp = (u8*)&v;
159164
switch (l) {
160-
case 3: vp[2] = d[2]; // fallthrough
161-
case 2: vp[1] = d[1]; // fallthrough
162-
case 1: vp[0] = d[0]; // fallthrough
165+
case 3:
166+
vp[2] = d[2]; // fallthrough
167+
fallthrough;
168+
case 2:
169+
vp[1] = d[1]; // fallthrough
170+
fallthrough;
171+
case 1:
172+
vp[0] = d[0]; // fallthrough
163173
}
164174
} else {
165175
v = masked_move256_len(d, l);
166176
}
177+
167178
if (noCase) {
168179
v = and256(v, caseMask);
169180
}

regex/runtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ hs_error_t HS_CDECL hs_scan_tfwstr(const hs_database_t *db,
12241224

12251225

12261226
TFW_STR_FOR_EACH_CHUNK(chunk, str, end) {
1227-
DEBUG_PRINTF("offset=%llu len=%u\n", chunk->data, chunk->len);
1227+
DEBUG_PRINTF("offset=%llu len=%lu\n", id->offset, chunk->len);
12281228
#ifdef DEBUG
12291229
dumpData(chunk->data, chunk->len);
12301230
#endif

scripts/regex_start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ for filename in ${tmp_path}/*.txt; do
1010

1111
rm -rf ${tmp_path}/out/ && mkdir ${tmp_path}/out
1212
#${script_path}/hscollider -e ${filename} -ao ${tmp_path}/out/ -n1 #this version for single block strings
13-
${script_path}/hscollider -e ${filename} -V5 -ao ${tmp_path}/out/ -n1
13+
#${script_path}/hscollider -e ${filename} -V5 -ao ${tmp_path}/out/ -n1 #this version starts hscollider from scripts directory
14+
hscollider -e ${filename} -V5 -ao ${tmp_path}/out/ -n1
1415

1516
mkdir $db_path
1617
dd if=$(echo ${tmp_path}/out/*.db) of=${db_path}/database

0 commit comments

Comments
 (0)