Skip to content

Commit

Permalink
fix: warning 53 (unboxed attribute used in the wrong location) (#83)
Browse files Browse the repository at this point in the history
When running `dune build @check` from the root of the repository, here is one
instance of the warning 53 I get.

    File "riot/runtime/core/proc_effect.ml", line 23, characters 5-12:
    23 |   [@@unboxed]
              ^^^^^^^
    Error (warning 53 [misplaced-attribute]): the "unboxed" attribute
    cannot appear in this context

This patch removes the incorrect `unboxed` attribute where needed, to make the
codebase warning free.
  • Loading branch information
lthms committed May 31, 2024
1 parent 8a2feeb commit 8b70e2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion riot/lib/logger_app.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open Logger.Make (struct
end)

module Formatter = struct
type Message.t += Log of log [@@unboxed]
type Message.t += Log of log

let stdout =
Format.make_formatter (output_substring stdout) (fun () -> flush stdout)
Expand Down
2 changes: 1 addition & 1 deletion riot/lib/telemetry_app.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type event = Telemetry.event = ..
let name = "Riot.Telemetry"

module Dispatcher = struct
type Core.Message.t += Event of Telemetry.event [@@unboxed]
type Core.Message.t += Event of Telemetry.event

let __main_dispatcher__ : Pid.t ref = ref Pid.zero

Expand Down
4 changes: 1 addition & 3 deletions riot/runtime/core/proc_effect.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ type _ Effect.t +=
selector : Message.t -> [ `select of 'msg | `skip ];
}
-> 'msg Effect.t
[@@unboxed]

type _ Effect.t += Yield : unit Effect.t [@@unboxed]
type _ Effect.t += Yield : unit Effect.t

type _ Effect.t +=
| Syscall : {
Expand All @@ -20,4 +19,3 @@ type _ Effect.t +=
timeout : Timeout.t;
}
-> unit Effect.t
[@@unboxed]

0 comments on commit 8b70e2a

Please sign in to comment.