schannel: fix compiler warnings #1394

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@MarcelRaad
Member

When UNICODE is not defined, the Curl_convert_UTF8_to_tchar macro maps
directly to its argument. As it is declared as a pointer to const and
InitializeSecurityContext expects a pointer to non-const, both MSVC and MinGW
issue a warning about implicitly casting away the const. Fix this by declaring
the variables as pointers to non-const.

@MarcelRaad MarcelRaad schannel: fix compiler warnings
When UNICODE is not defined, the Curl_convert_UTF8_to_tchar macro maps
directly to its argument. As it is declared as a pointer to const and
InitializeSecurityContext expects a pointer to non-const, both MSVC and MinGW
issue a warning about implicitly casting away the const. Fix this by declaring
the variables as pointers to non-const.
10a7d3c

@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mback2k, @masali-hp and @jay to be potential reviewers.

@jay
jay approved these changes Apr 6, 2017 View changes

before sending this upstream please amend to the commit message a blank line followed by a Ref: or a Closes to this PR

@MarcelRaad MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Apr 7, 2017
@MarcelRaad MarcelRaad schannel: fix compiler warnings
When UNICODE is not defined, the Curl_convert_UTF8_to_tchar macro maps
directly to its argument. As it is declared as a pointer to const and
InitializeSecurityContext expects a pointer to non-const, both MSVC and MinGW
issue a warning about implicitly casting away the const. Fix this by declaring
the variables as pointers to non-const.

Closes curl#1394
33ca733
@MarcelRaad MarcelRaad added a commit that closed this pull request Apr 7, 2017
@MarcelRaad MarcelRaad schannel: fix compiler warnings
When UNICODE is not defined, the Curl_convert_UTF8_to_tchar macro maps
directly to its argument. As it is declared as a pointer to const and
InitializeSecurityContext expects a pointer to non-const, both MSVC and MinGW
issue a warning about implicitly casting away the const. Fix this by declaring
the variables as pointers to non-const.

Closes #1394
33ca733
@MarcelRaad MarcelRaad closed this in 33ca733 Apr 7, 2017
@MarcelRaad MarcelRaad deleted the MarcelRaad:schannel_warnings branch Apr 7, 2017
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment