Suppress warning

I don't know of a way of fixing the function pointer warning.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
This commit is contained in:
Mahyar Koshkouei 2018-01-14 12:21:02 +00:00
parent 97d910da99
commit 5ac3dca1b7
1 changed files with 6 additions and 0 deletions

View File

@ -159,7 +159,13 @@ void retro_set_environment(retro_environment_t cb)
static void *get_proc_address_mpv(void *fn_ctx, const char *name)
{
/* The "ISO C forbids conversion of function pointer to object pointer
* type" warning is suppressed.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
void *proc_addr = (void *) hw_render.get_proc_address(name);
#pragma GCC diagnostic pop
if(proc_addr == NULL)
log_cb(RETRO_LOG_ERROR, "Failure obtaining %s proc address\n", name);