mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
crc32 module, clang spurious warning removal.
Closes GH-6725.
This commit is contained in:
parent
f06efce387
commit
ddea5c0816
1 changed files with 7 additions and 3 deletions
|
@ -50,8 +50,10 @@ static inline int has_crc32_insn() {
|
|||
# endif
|
||||
}
|
||||
|
||||
# pragma GCC push_options
|
||||
# pragma GCC target ("+nothing+crc")
|
||||
# if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC push_options
|
||||
# pragma GCC target ("+nothing+crc")
|
||||
# endif
|
||||
static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) {
|
||||
while (nr >= sizeof(uint64_t)) {
|
||||
crc = __crc32d(crc, *(uint64_t *)p);
|
||||
|
@ -73,7 +75,9 @@ static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) {
|
|||
}
|
||||
return crc;
|
||||
}
|
||||
# pragma GCC pop_options
|
||||
# if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC pop_options
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* {{{ Calculate the crc32 polynomial of a string */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue