Skip to content

GetProcAddress is marked FARPROC, will yield warning unless casted via void * - #926

Open
mywave82 wants to merge 1 commit into
xiph:masterfrom
mywave82:GetProcAddress
Open

GetProcAddress is marked FARPROC, will yield warning unless casted via void *#926
mywave82 wants to merge 1 commit into
xiph:masterfrom
mywave82:GetProcAddress

Conversation

@mywave82

@mywave82 mywave82 commented Aug 4, 2026

Copy link
Copy Markdown

Fixes these warnings when compiled with x86_64-w64-mingw32

[ 23%] Building C object src/libFLAC/CMakeFiles/FLAC.dir/__/share/win_utf8_io/win_utf8_io.c.obj
/X/flac-1.5.0/src/share/win_utf8_io/win_utf8_io.c: In function ‘get_utf8_argv’:
/X/flac-1.5.0/src/share/win_utf8_io/win_utf8_io.c:132:29: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘long long int ()()’} to ‘int ()(int *, wchar_t ***, wchar_t ***, int, int )’ {aka ‘int ()(int *, short unsigned int ***, short unsigned int ***, int, int *)’} [-Wcast-function-type]
132 | if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) {
| ^
[ 24%] Building C object src/libFLAC/CMakeFiles/FLAC.dir/ogg_decoder_aspect.c.obj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant