Skip to content

Reducing Warnings - Miscellaneous Warnings #958

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

Merged
merged 4 commits into from
Mar 24, 2022

Conversation

eramongodb
Copy link
Contributor

This is the first in a series of PRs intended to reduce the set of warnings currently being observed when building the C driver.

This PR addresses the following warnings:

  • LLDLinker on Windows

The LLDLinker module as currently written does not support MSVC, but was being unconditionally included. Its inclusion has been conditioned on not being compiled with MSVC.

  • -fPIC on Windows

MSVC does not recognize the -fPIC flag, but it was being unconditionally passed as an compilation argument. Instances of the flag have been replaced by use of the ENABLE_PIC CMake configuration option.

  • Format specifies for size_t and ssize_t

The format specifiers in assertion macros comparing size_t and ssize_t values were using incorrectly/inconsistent specifiers. size_t was being printed using the signed specifier, and ssize_t was being printed in hexadecimal representation. They have been fixed to use the correct specifier for signedness (unsigned and signed) and consistent representation (both in decimal).

  • C++ style comment in kms_request_str.c

A stray C++ style comment in kms_request_str.c has been edited to conform to C90 requirements.

@eramongodb eramongodb self-assigned this Mar 24, 2022
Copy link
Contributor

@rcsanchez97 rcsanchez97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eramongodb eramongodb merged commit 21f8bd5 into mongodb:master Mar 24, 2022
@eramongodb eramongodb deleted the cdriver-warnings branch March 24, 2022 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants