From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Warnings during building the current master on Win10 with MSYS2/MinGW64 Date: Wed, 24 Jul 2024 22:16:12 +0200 Message-ID: <86jzha4kc3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40676"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 24 22:33:18 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWifl-000APu-Ad for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Jul 2024 22:33:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWifB-0001aQ-D1; Wed, 24 Jul 2024 16:32:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWiew-0001ZE-ID for emacs-devel@gnu.org; Wed, 24 Jul 2024 16:32:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWiew-0003yk-Ae for emacs-devel@gnu.org; Wed, 24 Jul 2024 16:32:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=cS6Njwjy6EoGxaVXA827N4ALoqifso4fbpUzDx/1zKM=; b=KuYrcmEFNheF+r G61ifwyDOSivv3u/6CgGfnF8zCz2fWpSHj08ASaXUGI+jDGXWQRNU3dAEoicXiwxK6lM2NcaXf27/ L1QCm/AbMBxqCjFyIEcth0CP89nFvbT4hS4R5EZEfJTuzOJL4A/oBc0i6NqvygjcByYgHeXi/+0hr W4wuWlT34pXVSOllimyfobNqbiHYEqgSmmeyBUp5bkJqBYfBKvB6waQLdzYxqMwdXtCyHXfjkvvSx th61olQGA6T1uXnfEdwhmQnBTQBfRLBntJktsS8bOFDU4XKWb487vJd/XlYrCs5ctpBeB80BPjmJT CL//rc1S/hKvp3eN/juQ==; X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322062 Archived-At: Hi all, after a long time, I built Emacs (baf9f1210a) from master on my Win10 box and it occurred to me that I get more warnings than I used to. This is with $ gcc --version gcc.exe (Rev3, Built by MSYS2 project) 14.1.0 It starts with (linebreaks added manually): --8<---------------cut here---------------start------------->8--- 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); | ^~~~~~~~~~~~~~ --8<---------------cut here---------------end--------------->8--- and goes on with: --8<---------------cut here---------------start------------->8--- 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--- And others. Is there an interest to see them all, should I post them here or to the bug tracker? I build Emacs with a small script like this: --8<---------------cut here---------------start------------->8--- git clean -fdx --exclude=ChangeLog ./autogen.sh && \ CPPFLAGS='-DNDEBUG' \ CFLAGS='-O2 -g0 -pipe' \ LDFLAGS='-s -Wl,-s' \ ./configure \ --host=x86_64-w64-mingw32 \ --target=x86_64-w64-mingw32 \ --build=x86_64-w64-mingw32 \ --with-jpeg \ --with-gif \ --with-xpm \ --with-png \ --with-tiff \ --with-rsvg \ --with-webp \ --with-sqlite3 \ --with-xml2 \ --with-gnutls \ --with-lcms2 \ --with-modules \ --with-threads \ --with-native-compilation \ --with-native-image-api \ --with-tree-sitter \ --with-xdbe \ --without-imagemagick \ --without-dbus \ --without-gconf \ --without-gsettings \ --without-compress-install \ --without-mailutils \ --without-pop && \ make ... --8<---------------cut here---------------end--------------->8--- Best, Arash