[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings during building the current master on Win10 with MSYS2/MinG
From: |
Eli Zaretskii |
Subject: |
Re: Warnings during building the current master on Win10 with MSYS2/MinGW64 |
Date: |
Thu, 25 Jul 2024 08:56:36 +0300 |
> From: Arash Esbati <arash@gnu.org>
> Date: Wed, 24 Jul 2024 22:16:12 +0200
>
> boot-time-aux.h: In function 'get_windows_boot_time_fallback':
> boot-time-aux.h:395:26: warning: the comparison will always evaluate as
> 'true' for the address of 'GetTickCount64' will never be
> NULL [-Waddress]
> 395 | if (GetTickCount64Func != NULL)
> | ^~
> In file included from C:/msys64/mingw64/include/winbase.h:36,
> from C:/msys64/mingw64/include/windows.h:70,
> from boot-time.c:48:
> C:/msys64/mingw64/include/sysinfoapi.h:42:31: note: 'GetTickCount64' declared
> here
> 42 | WINBASEAPI ULONGLONG WINAPI GetTickCount64 (VOID);
> | ^~~~~~~~~~~~~~
This should be reported to Gnulib folks, not here, as it's Gnulib
code. (The warning is bogus, of course.)
> In file included from regex.c:69:
> regex_internal.c: In function 'create_ci_newstate':
> regex_internal.c:1599:48: warning: 'calloc' sizes specified with 'sizeof' in
> the earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 1599 | newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
> | ^~~~~~~~~~~~~
> regex_internal.c:1599:48: note: earlier argument should specify number of
> elements, later size of each element
> regex_internal.c: In function 'create_cd_newstate':
> regex_internal.c:1647:48: warning: 'calloc' sizes specified with 'sizeof' in
> the earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 1647 | newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
> | ^~~~~~~~~~~~~
> regex_internal.c:1647:48: note: earlier argument should specify number of
> elements, later size of each element
> In file included from regex.c:70:
> regcomp.c: In function 'init_dfa':
> regcomp.c:834:38: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 834 | dfa->state_table = calloc (sizeof (struct re_state_table_entry),
> table_size);
> | ^~~~~~
> regcomp.c:834:38: note: earlier argument should specify number of elements,
> later size of each element
> regcomp.c:865:60: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 865 | dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t),
> 1);
> | ^~~~~~~~
> regcomp.c:865:60: note: earlier argument should specify number of elements,
> later size of each element
> regcomp.c: In function 'parse_bracket_exp':
> regcomp.c:3058:46: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3058 | sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
> | ^~~~~~~~
> regcomp.c:3058:46: note: earlier argument should specify number of elements,
> later size of each element
> regcomp.c:3059:45: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3059 | mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
> | ^~~~~~~~~~~~
> regcomp.c:3059:45: note: earlier argument should specify number of elements,
> later size of each element
> regcomp.c: In function 'build_charclass_op':
> regcomp.c:3551:46: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3551 | sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
> | ^~~~~~~~
> regcomp.c:3551:46: note: earlier argument should specify number of elements,
> later size of each element
> regcomp.c:3557:45: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3557 | mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
> | ^~~~~~~~~~~~
> regcomp.c:3557:45: note: earlier argument should specify number of elements,
> later size of each element
> In file included from regex.c:71:
> regexec.c: In function 'get_subexp':
> regexec.c:2724:47: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 2724 | sub_top->path = calloc (sizeof (state_array_t),
> | ^~~~~~~~~~~~~
> regexec.c:2724:47: note: earlier argument should specify number of elements,
> later size of each element
> regexec.c: In function 'build_trtable':
> regexec.c:3269:29: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3269 | calloc (sizeof (re_dfastate_t *), SBC_MAX);
> | ^~~~~~~~~~~~~
> regexec.c:3269:29: note: earlier argument should specify number of elements,
> later size of each element
> regexec.c:3341:44: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3341 | (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
> | ^~~~~~~~~~~~~
> regexec.c:3341:44: note: earlier argument should specify number of elements,
> later size of each element
> regexec.c:3372:44: warning: 'calloc' sizes specified with 'sizeof' in the
> earlier argument and not in the later argument [-Wcalloc-transposed-args]
> 3372 | (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 *
> SBC_MAX);
> | ^~~~~~~~~~~~~
> regexec.c:3372:44: note: earlier argument should specify number of elements,
> later size of each element
> --8<---------------cut here---------------end--------------->8---
These are all correct, but again, they are about Gnulib code and
should be reported to the Gnulib mailing list.
> And others. Is there an interest to see them all, should I post them
> here or to the bug tracker?
If the warnings are for Emacs's own sources, please submit a bug
report. Gnulib-related warnings should be reported to the Gnulib
mailing list.
Thanks.