http2: use the correct function pointer typedef

Fixes gcc-8 picky compiler warnings
Reported-by: Rikard Falkeborn
Bug: #2560
Closes #2568
This commit is contained in:
Daniel Stenberg 2018-05-14 09:38:56 +02:00
parent 07b9826541
commit a5aa2bdf34
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 18 additions and 22 deletions

View file

@ -186,9 +186,6 @@ struct HTTP {
#endif
};
typedef int (*sending)(void); /* Curl_send */
typedef int (*recving)(void); /* Curl_recv */
#ifdef USE_NGHTTP2
/* h2 settings for this connection */
struct h2settings {
@ -197,15 +194,14 @@ struct h2settings {
};
#endif
struct http_conn {
#ifdef USE_NGHTTP2
#define H2_BINSETTINGS_LEN 80
nghttp2_session *h2;
uint8_t binsettings[H2_BINSETTINGS_LEN];
size_t binlen; /* length of the binsettings data */
sending send_underlying; /* underlying send Curl_send callback */
recving recv_underlying; /* underlying recv Curl_recv callback */
Curl_send *send_underlying; /* underlying send Curl_send callback */
Curl_recv *recv_underlying; /* underlying recv Curl_recv callback */
char *inbuf; /* buffer to receive data from underlying socket */
size_t inbuflen; /* number of bytes filled in inbuf */
size_t nread_inbuf; /* number of bytes read from in inbuf */