in file-posix.c's tr_sys_path_rename(), split assert(a && b) into assert(a) and assert(b) so the crash will tell us which failed [done] in file-posix.c, several minor dead assigns of ret when it's declared. examples: tr_sys_path_exists(), tr_sys_path_get_info(), tr_sys_path_is_same(), tr_sys_path_basename(), tr_sys_path_dirname() [done] in file-posix.c's tr_sys_path_get_info() and tr_sys_file_get_info() functions, set_system_error() is never called if the user passes a NULL info arg. Also, is there any reason to not assert (info != NULL)? [done] file*.[ch]'s tr_sys_file_get_std() and tr_std_sys_file_t enum don't seem to be used or tested, let's remove them or #if 0 them until needed [done] torrent-magnet.c's IO in tr_torrentGetMetadataPiece() should use tr_sys_file [done] file-posix.c's tr_sys_file_seek() should use the off_t type for my_new_offset and compare against (off_t) -1 ... off_t is signed [done] file-posix.c's tr_sys_file_read() and tr_sys_file_read_at() should use an ssize_t type for my_bytes_read, and compare it against (ssize_t)-1. Same for my_bytes_wirtten in tr_sys_file_write() and tr_sys_file_write_at() [done] file-posix.c's tr_sys_dir_get_current(), use tr_renew() instead of using realloc() directly so that we don't mix & match tr_* and stdlib memory management funcs [done] file-posix.c's tr_sys_dir_create(), dead assign of "my_error = NULL;" after tr_error_propagate() [done] file-posix.c, maybe static asserts of TR_BAD_SYS_DIR in tr_sys_dir_open()? [done] file-win32.c, nice cleanup of the leaks in path_is_same() [?] file-win32.c, resolve_path... damn. [?] file-win32.c, more minor dead assigns of ret, and also of wide_path [done] error.c, tr_error_free(): might be good to set >message to NULL or DEADBEEF after freeing? Not sure if necessary. these pointers can be dangling after a call to error_propogate() [done] error.c, let's remove or comment out the unused functions tr_error_prefix(), and tr_error_propagate_prefixed(), and error_prefix_valist() until we need them [done]