CCSDS 133.0-B Space Packet Protocol for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

wal, block, sse, zephyr: remove [mutable] from never-reassigned fields

Warning 69 (unused-field, mutable-never-assigned). Four independent
record fields were flagged as mutable but the code only mutates their
referents in place, never rebinds the record slot itself:

- ocaml-wal/lib/wal.ml: [t.file] (the Eio file resource; methods call
Eio.File.pwrite_all etc., the slot is set once at open time).
- ocaml-block/lib/block.ml: [Memory.state.data] (the backing bytes,
written via Bytes.blit_string; [Bytes.t] is already mutable).
- ocaml-sse/lib/sse.ml: [Parser.t.data_buf] (a Buffer.t, written via
Buffer.add_*; the slot never changes).
- ocaml-zephyr/lib/zephyr.ml: drop [mode : Read | Write] entirely —
set at open-time, read nowhere. The open_read / open_write
constructors already distinguish the two call shapes, so mode
tracking was redundant.

+8 -1
+3
dune
··· 1 + (env 2 + (dev 3 + (flags :standard %{dune-warnings})))
+1 -1
lib/space_packet.ml
··· 193 193 194 194 let codec = 195 195 Wire.Codec.v "SpacePacket" 196 - (fun version ptype shf apid seq_flags seq_count data_length data -> 196 + (fun version ptype shf apid seq_flags seq_count _data_length data -> 197 197 { 198 198 version; 199 199 packet_type = ptype;
+4
lib/space_packet.mli
··· 240 240 val header_schema : Wire.Everparse.t 241 241 (** EverParse schema for the primary header. Use this for C code generation via 242 242 {!Wire.Everparse.write_3d}. *) 243 + 244 + val module_ : Wire.Everparse.Raw.module_ 245 + (** EverParse raw module for the primary header, ready for the 3d code 246 + generator. *)