Clean up warnings

Clean up some warnings:

- `hton*` not declared when not using `bswap.h`
- Unused variable removed
- Unused function removed
- No newline at end of `tests/refs/branches/create.c`