Skip to content

Commit 4f2fe1b

Browse files
committed
avoid memset
1 parent 1d82747 commit 4f2fe1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tamp/_c_src/tamp/compressor.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ static inline bool validate_no_match_overlap(uint16_t write_pos, uint16_t match_
165165
}
166166
#endif
167167

168+
#if defined(__GNUC__) && !defined(__clang__)
169+
#pragma GCC push_options
170+
#pragma GCC optimize("-fno-tree-loop-distribute-patterns")
171+
#endif
168172
TAMP_OPTIMIZE_SIZE tamp_res tamp_compressor_init(TampCompressor* compressor, const TampConf* conf,
169173
unsigned char* window) {
170174
const TampConf conf_default = {
@@ -207,6 +211,9 @@ TAMP_OPTIMIZE_SIZE tamp_res tamp_compressor_init(TampCompressor* compressor, con
207211

208212
return TAMP_OK;
209213
}
214+
#if defined(__GNUC__) && !defined(__clang__)
215+
#pragma GCC pop_options
216+
#endif
210217

211218
#if TAMP_EXTENDED_COMPRESS
212219
/**

0 commit comments

Comments
 (0)