Comparing signed and unsigned integer expressions can have unexpected
results because the signed integer will get promoted to an unsigned
integer. To avoid the warning, add an explicit cast to the unsigned
type, along with a check to catch negative values.
The RAW output format exports each dive to a raw (binary) file. To
output multiple files, the filename is interpreted as a template and
should contain one or more placeholders.