Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/common/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@
# endif
#endif

/* portable `restrict` qualifier */
#ifndef ZSTD_RESTRICT
# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)
# define ZSTD_RESTRICT restrict
# elif defined(__GNUC__) || defined(__clang__)
# define ZSTD_RESTRICT __restrict__
# else
# define ZSTD_RESTRICT
# endif
#endif


/* target attribute */
#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__)
Expand Down
6 changes: 3 additions & 3 deletions lib/compress/zstd_lazy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,9 +1183,9 @@ ZSTD_row_getMatchMask(const BYTE* const tagRow, const BYTE tag, const U32 headGr
FORCE_INLINE_TEMPLATE
ZSTD_ALLOW_POINTER_OVERFLOW_ATTR
size_t ZSTD_RowFindBestMatch(
ZSTD_MatchState_t* ms,
const BYTE* const ip, const BYTE* const iLimit,
size_t* offsetPtr,
ZSTD_MatchState_t* ZSTD_RESTRICT ms,
const BYTE* const ZSTD_RESTRICT ip, const BYTE* const iLimit,
size_t* ZSTD_RESTRICT offsetPtr,
const U32 mls, const ZSTD_dictMode_e dictMode,
const U32 rowLog)
{
Expand Down