SCP: Silence Coverity warnings
This commit is contained in:
parent
3af3a8ea54
commit
064c8e54a8
2 changed files with 8 additions and 7 deletions
|
@ -1086,7 +1086,7 @@ ODS2_FileHeader Header;
|
|||
ODS2_Retreval *Retr;
|
||||
ODS2_SCB Scb;
|
||||
uint16 CheckSum1, CheckSum2;
|
||||
uint32 ScbLbn;
|
||||
uint32 ScbLbn = 0;
|
||||
t_offset ret_val = (t_offset)-1;
|
||||
|
||||
if ((dptr = find_dev_from_unit (uptr)) == NULL)
|
||||
|
@ -2605,7 +2605,8 @@ t_offset pos, size;
|
|||
|
||||
pos = (t_offset)lseek ((int)((long)f), (off_t)0, SEEK_CUR);
|
||||
size = (t_offset)lseek ((int)((long)f), (off_t)0, SEEK_END);
|
||||
lseek ((int)((long)f), (off_t)pos, SEEK_SET);
|
||||
if (pos != (t_offset)-1)
|
||||
(void)lseek ((int)((long)f), (off_t)pos, SEEK_SET);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
@ -3651,7 +3652,7 @@ static FILE *sim_vhd_disk_merge (const char *szVHDPath, char **ParentVHD)
|
|||
continue;
|
||||
++NeededBlock;
|
||||
BlockOffset = SectorSize*((uint64)(NtoHl (hVHD->BAT[BlockNumber]) + BitMapSectors));
|
||||
if ((BlockNumber*SectorsPerBlock + BlockSectors) > ((uint64)NtoHll (hVHD->Footer.CurrentSize))/SectorSize)
|
||||
if (((uint64)BlockNumber*SectorsPerBlock + BlockSectors) > ((uint64)NtoHll (hVHD->Footer.CurrentSize))/SectorSize)
|
||||
BlockSectors = (uint32)(((uint64)NtoHll (hVHD->Footer.CurrentSize))/SectorSize - (BlockNumber*SectorsPerBlock));
|
||||
if (ReadFilePosition(hVHD->File,
|
||||
BlockData,
|
||||
|
|
|
@ -1127,9 +1127,9 @@ FD_ZERO (er_p);
|
|||
FD_SET (sock, rw_p);
|
||||
FD_SET (sock, er_p);
|
||||
if (rd)
|
||||
select ((int) sock + 1, rw_p, NULL, er_p, &zero);
|
||||
(void)select ((int) sock + 1, rw_p, NULL, er_p, &zero);
|
||||
else
|
||||
select ((int) sock + 1, NULL, rw_p, er_p, &zero);
|
||||
(void)select ((int) sock + 1, NULL, rw_p, er_p, &zero);
|
||||
if (FD_ISSET (sock, er_p))
|
||||
return -1;
|
||||
if (FD_ISSET (sock, rw_p)) {
|
||||
|
@ -1200,8 +1200,8 @@ if (socknamebuf)
|
|||
*socknamebuf = (char *)calloc(1, NI_MAXHOST+NI_MAXSERV+4);
|
||||
if (peernamebuf)
|
||||
*peernamebuf = (char *)calloc(1, NI_MAXHOST+NI_MAXSERV+4);
|
||||
getsockname (sock, (struct sockaddr *)&sockname, &socknamesize);
|
||||
getpeername (sock, (struct sockaddr *)&peername, &peernamesize);
|
||||
(void)getsockname (sock, (struct sockaddr *)&sockname, &socknamesize);
|
||||
(void)getpeername (sock, (struct sockaddr *)&peername, &peernamesize);
|
||||
if (socknamebuf != NULL) {
|
||||
_sim_getaddrname ((struct sockaddr *)&sockname, (size_t)socknamesize, hostbuf, portbuf);
|
||||
sprintf(*socknamebuf, "[%s]:%s", hostbuf, portbuf);
|
||||
|
|
Loading…
Add table
Reference in a new issue