Skip to content

Commit

Permalink
tiny changes to avoid unsigned/signed comparison warning
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbarratt committed Mar 3, 2017
1 parent 5a11afd commit 9492ac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backuppc/bpc_attrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static void bpc_attrib_xattrListKey(bpc_attrib_xattr *xattr, xattrList_info *inf
}
}
if ( info->list ) {
if ( info->idx + xattr->key.keyLen > info->listLen ) {
if ( info->idx + (signed)xattr->key.keyLen > info->listLen ) {
info->idx = -1;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion backuppc/bpc_poolWrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int bpc_poolWrite_write(bpc_poolWrite_info *info, uchar *data, size_t dataLen)
info->fdOpen = 1;
md5_begin(&info->md5);
if ( info->bufferIdx > 0 ) {
if ( (writeRet = bpc_fileZIO_write(&info->fd, info->buffer, info->bufferIdx)) != info->bufferIdx ) {
if ( (writeRet = bpc_fileZIO_write(&info->fd, info->buffer, info->bufferIdx)) != (signed)info->bufferIdx ) {
info->errorCnt++;
bpc_logErrf("bpc_poolWrite_write: write of %lu bytes to %s failed, return = %d",
(unsigned long)info->bufferIdx, info->tmpFileName, (int)writeRet);
Expand Down

0 comments on commit 9492ac7

Please sign in to comment.