<html><head></head><body>This uses the same type as the calling function (vlc_CPU) returning the same value. I'm not going explain such basic fact in commit logs.<br><br><div class="gmail_quote">Le 30 mars 2020 10:40:58 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2020-03-30 9:27, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">I'm not changing the type here. And VLC code assumes unsigned is no <br>smaller than uint32_t (which is correct in POSIX and all supported <br>non-POSIX platforms).<br></blockquote><br>If the variable was stored in a uint32_t rather than an unsigned there <br>might be a reason. Using a bigger type is probably OK. But I don't see <br>any explanation in the patch. And it doesn't qualify as a nonfunctional <br>change to me.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le 30 mars 2020 09:21:05 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a <br>écrit :<br><br> On 2020-03-29 22:43, Rémi Denis-Courmont wrote:<hr> src/misc/cpu.c | 15 +++++++++------<br> 1 file changed, 9 insertions(+), 6 deletions(-)<br><br> diff --git a/src/misc/cpu.c b/src/misc/cpu.c<br> index d42d7ed066..8a8835b79b 100644<br> --- a/src/misc/cpu.c<br> +++ b/src/misc/cpu.c<br> @@ -55,8 +55,6 @@<br> #include <machine/cpu.h><br> #endif<br><br> -static uint32_t cpu_flags;<br> -<br> #if defined (__i386__) || defined (__x86_64__) || defined<br> (__powerpc__) \<br> || defined (__ppc__) || defined (__ppc64__) || defined<br> (__powerpc64__)<br> # if defined (HAVE_FORK)<br> @@ -113,10 +111,9 @@ static void Altivec_test (void)<br> #endif<br><br> /**<br> - * Determines the CPU capabilities and stores them in cpu_flags.<br> - * The result can be retrieved with vlc_CPU().<br> + * Determines the CPU capabilities.<br> */<br> -static void vlc_CPU_init(void)<br> +static unsigned vlc_CPU_raw(void)<br><br><br> Should be uint32_t.<br><br> {<br> uint32_t i_capabilities = 0;<br><br> @@ -247,8 +244,14 @@ out:<br> # endif<br><br> #endif<br> + return i_capabilities;<br> +}<br><br> - cpu_flags = i_capabilities;<br> +static uint32_t cpu_flags;<br> +<br> +static void vlc_CPU_init(void)<br> +{<br> + cpu_flags = vlc_CPU_raw();<br> }<br><br> VLC_WEAK unsigned vlc_CPU(void)<br> -- <br> 2.26.0<hr> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><hr> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser <br>ma brièveté.<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>