`ftruncate()` is annotated such that the compiler (at least GCC 13)
warns when the returned status is not used.
This commit adds a `GHOST_ASSERT()` to check that result in debug
builds. In non-debug builds it's discarded without checking, but
explicitly as to not trigger this warning.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/132108