Skip to content

Commit

Permalink
directwrite: cast function pointer through void* to quelch warning
Browse files Browse the repository at this point in the history
GCC and MSVC (at least) warn about this cast as the function types
appear to be incompatible. This is correct with GetProcAddress.
  • Loading branch information
astiob committed Apr 30, 2021
1 parent db58132 commit d82f999
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libass/ass_directwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,9 @@ ASS_FontProvider *ass_directwrite_add_provider(ASS_Library *lib,
if (!directwrite_lib)
goto cleanup;

DWriteCreateFactoryPtr = (DWriteCreateFactoryFn)GetProcAddress(directwrite_lib,
"DWriteCreateFactory");
DWriteCreateFactoryPtr =
(DWriteCreateFactoryFn)(void *)GetProcAddress(directwrite_lib,
"DWriteCreateFactory");
if (!DWriteCreateFactoryPtr)
goto cleanup;

Expand Down

0 comments on commit d82f999

Please sign in to comment.