Hooks narrow cast types
Currently, our client hooks return whatever syscall intercept returns. This is usually a cast from long
to int
. This is a narrowing operation and therefore we should us narrow_cast
from gsl to make clear that this is acceptable (we do not need an exception in this case). See here https://github.com/microsoft/GSL/blob/main/docs/headers.md#user-content-H-util-narrow_cast
This issue includes adding GSL to GekkoFS and adding gsl::narrow_cast
to all hooks that narrow.