Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
dbc3f839 by Rémi Denis-Courmont at 2024-10-06T12:05:10+00:00
stdbit: fix CTZ fall-back

The computed value was incorrect for types smaller than long long. The
code is not really used by anything at the moment, since we pretty much
compile with Clang or GCC only.

- - - - -


1 changed file:

- compat/stdbit/stdbit.h


Changes:

=====================================
compat/stdbit/stdbit.h
=====================================
@@ -178,6 +178,8 @@ static inline unsigned int __stdc_trailing_zeros(unsigned 
long long value,
 {
     unsigned int zeros = size * CHAR_BIT;
 
+    values <<= (sizeof (value) * CHAR_BIT) - zeros;
+
     while (value != 0) {
         value <<= 1;
         zeros--;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/dbc3f839d87d84c7eda665d1d12b2e6a9b1d0383

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/dbc3f839d87d84c7eda665d1d12b2e6a9b1d0383
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to