New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nss: fix MinGW compiler warnings #1393

Merged
merged 1 commit into from Apr 18, 2017

Conversation

Projects
None yet
4 participants
@MarcelRaad
Member

MarcelRaad commented Apr 6, 2017

This fixes 3 warnings issued by MinGW:

  1. PR_ImportTCPSocket actually has a paramter of type PROsfd instead of
    PRInt32, which is 64 bits on Windows. Fixed this by including the
    corresponding header file instead of redeclaring the function, which is
    supported even though it is in the private include folder. [1]
  2. In 64-bit mode, size_t is 64 bits while CK_ULONG is 32 bits, so an explicit
    narrowing cast is needed.
  3. Curl_timeleft returns time_t instead of long since commit
    21aa32d.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ImportTCPSocket

@mention-bot

This comment has been minimized.

mention-bot commented Apr 6, 2017

@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kdudka, @bagder and @captain-caveman2k to be potential reviewers.

@bagder bagder added the build label Apr 8, 2017

@bagder bagder requested a review from kdudka Apr 15, 2017

@kdudka

kdudka approved these changes Apr 18, 2017

Looks good to me. Thanks!

nss: fix MinGW compiler warnings
This fixes 3 warnings issued by MinGW:
1. PR_ImportTCPSocket actually has a paramter of type PROsfd instead of
PRInt32, which is 64 bits on Windows. Fixed this by including the
corresponding header file instead of redeclaring the function, which is
supported even though it is in the private include folder. [1]
2. In 64-bit mode, size_t is 64 bits while CK_ULONG is 32 bits, so an explicit
narrowing cast is needed.
3. Curl_timeleft returns time_t instead of long since commit
21aa32d.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ImportTCPSocket

Closes #1393

@MarcelRaad MarcelRaad force-pushed the MarcelRaad:nss_warnings branch from be6b841 to a4ff8a1 Apr 18, 2017

@MarcelRaad

This comment has been minimized.

Member

MarcelRaad commented Apr 18, 2017

Thanks for the review Kamil!

@MarcelRaad MarcelRaad merged commit a4ff8a1 into curl:master Apr 18, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MarcelRaad MarcelRaad deleted the MarcelRaad:nss_warnings branch Apr 18, 2017

@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2018

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