Skip to content

Fix warnings #27152

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 9 commits into from
Sep 13, 2019
Merged

Fix warnings #27152

merged 9 commits into from
Sep 13, 2019

Conversation

save-buffer
Copy link

@save-buffer save-buffer commented Sep 12, 2019

This fixes a bunch of warnings, most of them complaining about not all code paths returning a value. Also fixes complaints about dump being for use only in the debugger when one dump function calls another.

#elif SWIFT_COMPILER_IS_MSVC
#pragma warning(push)
#pragma warning(disable : 4996)
#endif
Copy link
Member

Choose a reason for hiding this comment

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

I can't believe I never thought of this. This is a great idea!

@compnerd
Copy link
Member

@swift-ci please smoke test

@save-buffer save-buffer force-pushed the fix_warnings branch 2 times, most recently from b9a70cf to cc45e50 Compare September 12, 2019 23:37
#pragma warning(disable : 4996)
#endif

LLVM_ATTRIBUTE_DEPRECATED(
Copy link
Member

Choose a reason for hiding this comment

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

Can we place this on the declaration instead of the definition?

Copy link
Author

Choose a reason for hiding this comment

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

OK so looks like declaration was already marked with this, and testing with clang-cl doesn't produce this warning. Therefore, I think we only have to worry about it if it's MSVC.

#pragma warning(disable : 4996)
#endif

LLVM_ATTRIBUTE_DEPRECATED(
Copy link
Member

Choose a reason for hiding this comment

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

Similar

@compnerd
Copy link
Member

@swift-ci please smoke test

@compnerd compnerd merged commit a17573a into swiftlang:master Sep 13, 2019
@save-buffer save-buffer deleted the fix_warnings branch September 13, 2019 19:05
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