On Tue, May 9, 2023 at 12:40 AM Samuel Thibault <samuel.thiba...@gnu.org> wrote: > > - size_t opts_len = sizeof opts; > > + mach_msg_type_number_t opts_len = sizeof opts; > > ? That doesn't make sense, sizeof does return size_t.
sizeof returns size_t, yes. But this code later passes opts_len *by pointer* to fsys_get_options (), which expects a value of type mach_msg_type_number_t (or a pointer to that, rather). So the fix here is not that the value sizeof evaluates to was being saved to a wrong type, but that a wrong type was being passed to a Mach RPC. I'm now casting the result of sizeof from size_t to mach_msg_type_number_t, and passing that to fsys_get_options (). I hope this makes sense now; and you're going to see *a lot* of similar changes in this patchset. Sergey