Add a guard assert to get_cmd_name()

To ensure that we won't get (size_t)-1 number.
Add a check for NULL value (when not enough mem)
Initialize a variable for additional safety
Fix using of strncat() function in quick_view_file
Note fixes suggested by clang in the Changelog
Merge branch 'clang-sa-suggestions'