emacs-devel
[Top][All Lists]
Advanced

[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: Collin Funk
Subject: Re: Warnings during building the current master on Win10 with MSYS2/MinGW64
Date: Wed, 24 Jul 2024 23:49:42 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.)

I agree that it is bogus. Most Gnulib Windows modules will have this
warning. The code is something like:

-----------------------------------------------
# if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)

/* GetTickCount64 is only available on Windows Vista and later.  */
typedef ULONGLONG (WINAPI * GetTickCount64FuncType) (void);

/* NULL if not loaded from the DLL, else a function pointer.  */
static GetTickCount64FuncType GetTickCount64Func = NULL;
static BOOL initialized = FALSE;

# else /* No need to load DLL.  */

#  define GetTickCount64Func GetTickCount64

# endif
-----------------------------------------------

In the 'else' case the warning is triggered since it is just the
function symbol not a pointer to it.

I'm not sure if this idiom came before that warning existed or something
else. In any case if the compiler is smart enough to warn about it then
it is probably smart enough to optimize the check out.

Collin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]