Fixed a lot of issues reported by cppcheck 1.78

This commit is contained in:
heckflosse
2017-04-08 22:41:46 +02:00
parent 73e14702dd
commit 6e55f6bab5
41 changed files with 226 additions and 254 deletions

View File

@@ -55,7 +55,6 @@ write_icc_profile (j_compress_ptr cinfo,
{
unsigned int num_markers; /* total number of markers we'll write */
int cur_marker = 1; /* per spec, counting starts at 1 */
unsigned int length; /* number of bytes to write in this marker */
/* Calculate the number of markers we'll need, rounding up of course */
num_markers = icc_data_len / MAX_DATA_BYTES_IN_MARKER;
@@ -66,7 +65,7 @@ write_icc_profile (j_compress_ptr cinfo,
while (icc_data_len > 0) {
/* length of profile to put in this marker */
length = icc_data_len;
unsigned int length = icc_data_len; /* number of bytes to write in this marker */
if (length > MAX_DATA_BYTES_IN_MARKER) {
length = MAX_DATA_BYTES_IN_MARKER;