]> granicus.if.org Git - curl/commit
typecheck-gcc: handle function pointers properly
authorMarcel Raad <raad@teamviewer.com>
Mon, 10 Apr 2017 13:24:44 +0000 (15:24 +0200)
committerMarcel Raad <raad@teamviewer.com>
Fri, 21 Apr 2017 21:18:59 +0000 (23:18 +0200)
commitcbb59ed9ce9555e0dc0b485247fe86f0e45006b3
tree66207bb63c8118dea86c8de8019978e24d9981d6
parent5f830eaba0b4c00dabf095cede048ddcea736d9d
typecheck-gcc: handle function pointers properly

All the callbacks passed to curl_easy_setopt are defined as function
pointers. The possibility to pass both functions and function pointers
was handled for the callbacks that typecheck-gcc.h defined as
compatible, but not for the public callback types themselves.

This makes all compatible callback types defined in typecheck-gcc.h
function pointers too and checks all functions uniformly with
_curl_callback_compatible, which handles both functions and function
pointers.

A symptom of the problem was a warning in tool_operate.c with
--disable-libcurl-option and without --enable-debug as that file
passes the callback functions to curl_easy_setopt directly.

Fixes https://github.com/curl/curl/issues/1403
Closes https://github.com/curl/curl/pull/1404
include/curl/typecheck-gcc.h