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

Enable more warnings for 0.1.0 branch #360

Merged
merged 17 commits into from
Oct 1, 2022

Conversation

leque
Copy link
Contributor

@leque leque commented Sep 30, 2022

This PR enables more warnings of OCaml compiler while building SATySFi itself.

This PR also includes fixes for warnings. This does not aim to improve global code structure, but rewrite code locally to eliminate warnings; simply remove unused code and flags, prefix _ to unused variables, add missing patterns, ..., etc.

Removing unused value declarations (fixing warning 32) is a future work since it is unclear to me which declarations should be removed.

`exception InvalidYOJSON` is not used since b9cb92a
* type `script` seems not to be used at their birth (ab4b5b7)
* type `dir_path` is not used since 26871d9
* type `file_path` and `key` are not used since 6ed4d06
type `indirect` is not used at their birth (e020b77)
types `predefined_encoding`, `encoding`, `differences`, `matrix` were
used in module `Type1Scheme_`, `Type3`, ...,
but they are commented out at 873254e
type `chunk_info` is not used at their birth (c866933)
@gfngfn
Copy link
Owner

gfngfn commented Oct 1, 2022

Thank you so much!

I confirmed that reverting some changes manually emits errors like the following:

File "src/frontend/evaluator.cppo.ml", line 412, characters 8-14:
Error (warning 27 [unused-var-strict]): unused variable ast1.
File "src/frontend/evaluator.cppo.ml", line 999, characters 10-28:
Error (warning 39 [unused-rec-flag]): unused rec flag.
File "src/frontend/main.ml", line 234, characters 2-38:
Error (warning 37 [unused-constructor]): constructor DisplayLineOption is never used to build values.
(However, this constructor appears in patterns.)

@gfngfn gfngfn merged commit cfedd61 into gfngfn:dev-0-1-0 Oct 1, 2022
@gfngfn gfngfn mentioned this pull request Oct 1, 2022
@leque leque deleted the enable-more-warnings branch October 2, 2022 02:05
@gfngfn gfngfn mentioned this pull request Apr 7, 2024
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.

None yet

2 participants