From 8b70e2a2b9bac7235e2572cd954ddce89f660bf4 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Fri, 31 May 2024 21:45:46 +0200 Subject: [PATCH] fix: warning 53 (unboxed attribute used in the wrong location) (#83) 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. --- riot/lib/logger_app.ml | 2 +- riot/lib/telemetry_app.ml | 2 +- riot/runtime/core/proc_effect.ml | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/riot/lib/logger_app.ml b/riot/lib/logger_app.ml index 8a57c28..10b324f 100644 --- a/riot/lib/logger_app.ml +++ b/riot/lib/logger_app.ml @@ -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) diff --git a/riot/lib/telemetry_app.ml b/riot/lib/telemetry_app.ml index 6a9a0bd..9e5502a 100644 --- a/riot/lib/telemetry_app.ml +++ b/riot/lib/telemetry_app.ml @@ -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 diff --git a/riot/runtime/core/proc_effect.ml b/riot/runtime/core/proc_effect.ml index ce9759e..7c0d3ea 100644 --- a/riot/runtime/core/proc_effect.ml +++ b/riot/runtime/core/proc_effect.ml @@ -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 : { @@ -20,4 +19,3 @@ type _ Effect.t += timeout : Timeout.t; } -> unit Effect.t - [@@unboxed]