Skip to content

Enable more warnings in the codebase.

Hugo Heuzard requested to merge nomadic-labs/tezos:hhugo-warn into master

Context

This MR proposes to be explicit about warnings enabled in the codebase instead of relying on dune defaults. This MR enable strictly more warnings than dune.

Dune default, all but

4; 29; 40; 41; 42; 44; 45; 48; 58; 59; 60; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72`

This MR, all but

4;     40; 41; 42; 44; 45; 48;         60;                 67;     69; 70

In particular, it enable warning 68 (about hidden allocation of closure) and fix the codebase accordingly.

68 [match-on-mutable-state-prevent-uncurry]
Pattern-matching depending on mutable state prevents the remaining arguments from being uncurried.

We also enable warnings 71 and 72 that are about the new tmc attribute. @yrg

71 [unused-tmc-attribute]
Unused @tail_mod_cons attribute

72 [tmc-breaks-tailcall]
A tail call is turned into a non-tail call by the @tail_mod_cons transformation.

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Hugo Heuzard

Merge request reports