Commit b1c8873025f18433f7336ba6b8e3b72a4855f0d3

Authored by Josh Klontz
1 parent 86111c8a

fixed msvc2012 warnings

3rdparty/http-parser-2.1/http_parser.c
@@ -2004,21 +2004,21 @@ http_parse_host(const char * buf, struct http_parser_url *u, int found_at) { @@ -2004,21 +2004,21 @@ http_parse_host(const char * buf, struct http_parser_url *u, int found_at) {
2004 switch(new_s) { 2004 switch(new_s) {
2005 case s_http_host: 2005 case s_http_host:
2006 if (s != s_http_host) { 2006 if (s != s_http_host) {
2007 - u->field_data[UF_HOST].off = p - buf; 2007 + u->field_data[UF_HOST].off = (uint16_t) (p - buf);
2008 } 2008 }
2009 u->field_data[UF_HOST].len++; 2009 u->field_data[UF_HOST].len++;
2010 break; 2010 break;
2011 2011
2012 case s_http_host_v6: 2012 case s_http_host_v6:
2013 if (s != s_http_host_v6) { 2013 if (s != s_http_host_v6) {
2014 - u->field_data[UF_HOST].off = p - buf; 2014 + u->field_data[UF_HOST].off = (uint16_t) (p - buf);
2015 } 2015 }
2016 u->field_data[UF_HOST].len++; 2016 u->field_data[UF_HOST].len++;
2017 break; 2017 break;
2018 2018
2019 case s_http_host_port: 2019 case s_http_host_port:
2020 if (s != s_http_host_port) { 2020 if (s != s_http_host_port) {
2021 - u->field_data[UF_PORT].off = p - buf; 2021 + u->field_data[UF_PORT].off = (uint16_t) (p - buf);
2022 u->field_data[UF_PORT].len = 0; 2022 u->field_data[UF_PORT].len = 0;
2023 u->field_set |= (1 << UF_PORT); 2023 u->field_set |= (1 << UF_PORT);
2024 } 2024 }
@@ -2027,7 +2027,7 @@ http_parse_host(const char * buf, struct http_parser_url *u, int found_at) { @@ -2027,7 +2027,7 @@ http_parse_host(const char * buf, struct http_parser_url *u, int found_at) {
2027 2027
2028 case s_http_userinfo: 2028 case s_http_userinfo:
2029 if (s != s_http_userinfo) { 2029 if (s != s_http_userinfo) {
2030 - u->field_data[UF_USERINFO].off = p - buf ; 2030 + u->field_data[UF_USERINFO].off = (uint16_t) (p - buf) ;
2031 u->field_data[UF_USERINFO].len = 0; 2031 u->field_data[UF_USERINFO].len = 0;
2032 u->field_set |= (1 << UF_USERINFO); 2032 u->field_set |= (1 << UF_USERINFO);
2033 } 2033 }
@@ -2120,7 +2120,7 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect, @@ -2120,7 +2120,7 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
2120 continue; 2120 continue;
2121 } 2121 }
2122 2122
2123 - u->field_data[uf].off = p - buf; 2123 + u->field_data[uf].off = (uint16_t) (p - buf);
2124 u->field_data[uf].len = 1; 2124 u->field_data[uf].len = 1;
2125 2125
2126 u->field_set |= (1 << uf); 2126 u->field_set |= (1 << uf);