]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
locale: Fix implicit conversion on collate_finish
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 17 Oct 2025 19:12:49 +0000 (16:12 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 20 Oct 2025 14:33:54 +0000 (11:33 -0300)
Clang issues:

programs/ld-collate.c:1824:55: error: implicit conversion from 'unsigned
long' to 'unsigned int' changes value from 18446744073709551615 to
4294967295 [-Werror,-Wconstant-conversion]
  collate->undefined.used_in_level = need_undefined ? ~0ul : 0;
                                   ~                  ^~~~

Reviewed-by: Collin Funk <collin.funk1@gmail.com>
locale/programs/ld-collate.c

index 7de3ba064d8bb6ecba10c574c5478610cb18bb1f..e9a9e6dc342292927fcfb7a18a1fef737eb0177e 100644 (file)
@@ -1821,7 +1821,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
 
   /* Now determine whether the UNDEFINED entry is needed and if yes,
      whether it was defined.  */
-  collate->undefined.used_in_level = need_undefined ? ~0ul : 0;
+  collate->undefined.used_in_level = need_undefined ? ~0u : 0;
   if (collate->undefined.file == NULL)
     {
       if (need_undefined)