fixed potential buffer overflow, detected by Coverity.
eliminated unused variable, found by Coverity.
silenced a Coverity warning.
edited comment.
fixed comment.
fixed potential buffer overflow, detected by Coverity.