]> granicus.if.org Git - curl/commitdiff
http2: declare TU-local variables static
authorMarcel Raad <raad@teamviewer.com>
Sun, 30 Apr 2017 20:33:33 +0000 (22:33 +0200)
committerMarcel Raad <raad@teamviewer.com>
Sun, 30 Apr 2017 20:33:33 +0000 (22:33 +0200)
This fixes the following clang warnings:

http2.c:184:27: error: no previous extern declaration for non-static
variable 'Curl_handler_http2' [-Werror,-Wmissing-variable-declarations]
http2.c:204:27: error: no previous extern declaration for non-static
variable 'Curl_handler_http2_ssl'
[-Werror,-Wmissing-variable-declarations]

lib/http2.c

index 264c66700ed612b3cd99a7d03c1f912c996fb2e2..7f891ed32739eaf29b5a71ceb0653b61928d0930 100644 (file)
@@ -181,7 +181,7 @@ void Curl_http2_setup_conn(struct connectdata *conn)
  * but will be used at run-time when the protocol is dynamically switched from
  * HTTP to HTTP2.
  */
-const struct Curl_handler Curl_handler_http2 = {
+static const struct Curl_handler Curl_handler_http2 = {
   "HTTP",                               /* scheme */
   ZERO_NULL,                            /* setup_connection */
   Curl_http,                            /* do_it */
@@ -201,7 +201,7 @@ const struct Curl_handler Curl_handler_http2 = {
   PROTOPT_STREAM                        /* flags */
 };
 
-const struct Curl_handler Curl_handler_http2_ssl = {
+static const struct Curl_handler Curl_handler_http2_ssl = {
   "HTTPS",                              /* scheme */
   ZERO_NULL,                            /* setup_connection */
   Curl_http,                            /* do_it */