Skip to content
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

Fix warnings, selectively re-enable -warn-error #222

Merged
merged 4 commits into from
May 17, 2017

Conversation

djs55
Copy link
Collaborator

@djs55 djs55 commented May 17, 2017

Previously the -w and -warn-error compiler arguments were lost with the switch to jbuilder. This PR

  • fixes all the warnings including
    • the Lwt_unix.bind deprecation warning by using the new Lwt_unix.Versioned.bind_2
    • avoiding pattern matching on a Failure <string>
  • re-enables -w and selective -warn-error

djs55 added 4 commits May 17, 2017 14:13
In lwt >= 2.7.0 the new `Lwt_unix.bind` API is categorised as blocking
since it will block under some circumstances. This patch fixes a warning
by using the new interface.

Note this code is not used by default. By default we use `uwt`.

Signed-off-by: David Scott <[email protected]>
- many unused bindings
- many bindings missing in pattern-matches
- many ambiguous field names
- many unused arguments

Signed-off-by: David Scott <[email protected]>
Previously we used `Failure` as a quick means of jumping out of an
expression to the exception handler. However `Failure` is a special
exception where the string is only meant to be recorded, not matched.

This patch uses a first-class `Enoent` exception.

Note the `Failure "BADWALK"` case could never happen: no code will
throw this error.

Signed-off-by: David Scott <[email protected]>
@djs55 djs55 merged commit 58a3200 into moby:master May 17, 2017
@djs55 djs55 deleted the lwt-warnings branch May 17, 2017 14:46
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.

1 participant