Skip to content

Fix eight warnings on Linux. #327

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 1 commit into from
Dec 8, 2015
Merged

Conversation

erg
Copy link
Contributor

@erg erg commented Dec 7, 2015

No description provided.

@@ -1318,6 +1315,7 @@ bool ModelASTWalker::findUrlStartingLoc(StringRef Text,
return true;
}
}
#endif
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this cause equivalent unreachable code warnings for return false?

Could you do #ifdef ... #else ... #endif instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the 'return false' is reachable with and without SWIFT_HAVE_WORKING_STD_REGEX?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see. Cute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I patched it both ways but settled on this way because it looked cleaner.

Fix spurious docs warning that @in and @in_guaranteed should be ``fn``.

Add ``#ifdef SWIFT_OBJC_INTEROP`` to silence a -Wunused-function
on linux since that function is only used from within that #ifdef
elsewhere.

Fix three -Wunused-function warnings on linux.

Fix two -Wunreachable-code warnings on linux dealing with
SWIFT_HAVE_WORKING_STD_REGEX.
@slavapestov
Copy link
Contributor

I think the latest version is OK. Merging.

slavapestov added a commit that referenced this pull request Dec 8, 2015
Fix eight warnings on Linux.
@slavapestov slavapestov merged commit a3f8548 into swiftlang:master Dec 8, 2015
kateinoigakukun added a commit to kateinoigakukun/swift that referenced this pull request Mar 6, 2020
edymtt added a commit to edymtt/swift that referenced this pull request Oct 22, 2020
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
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