SCP: Cleanup MinGW compile warnings
This commit is contained in:
parent
ad40f57809
commit
3cca0cf90b
3 changed files with 5 additions and 32 deletions
|
@ -4142,10 +4142,10 @@ VhdPathToHostPath (const char *szVhdPath,
|
|||
char *c;
|
||||
char *d = szHostPath;
|
||||
|
||||
strncpy (szHostPath, szVhdPath, HostPathSize-1);
|
||||
memmove (szHostPath, szVhdPath, HostPathSize);
|
||||
szHostPath[HostPathSize-1] = '\0';
|
||||
#if defined(VMS)
|
||||
c = strchr (szVhdPath, ':');
|
||||
c = strchr (szHostPath, ':');
|
||||
if (*(c+1) != '\\')
|
||||
return NULL;
|
||||
*(c+1) = '[';
|
||||
|
|
32
sim_fio.c
32
sim_fio.c
|
@ -291,40 +291,12 @@ return (t_offset)(ftell (st));
|
|||
|
||||
int sim_fseeko (FILE *st, t_offset offset, int whence)
|
||||
{
|
||||
fpos_t fileaddr;
|
||||
struct _stati64 statb;
|
||||
|
||||
switch (whence) {
|
||||
|
||||
case SEEK_SET:
|
||||
fileaddr = (fpos_t)offset;
|
||||
break;
|
||||
|
||||
case SEEK_END:
|
||||
if (_fstati64 (_fileno (st), &statb))
|
||||
return (-1);
|
||||
fileaddr = statb.st_size + offset;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
if (fgetpos (st, &fileaddr))
|
||||
return (-1);
|
||||
fileaddr = fileaddr + offset;
|
||||
break;
|
||||
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
return fsetpos (st, &fileaddr);
|
||||
return _fseeki64 (st, (__int64)offset, whence);
|
||||
}
|
||||
|
||||
t_offset sim_ftell (FILE *st)
|
||||
{
|
||||
fpos_t fileaddr;
|
||||
if (fgetpos (st, &fileaddr))
|
||||
return (-1);
|
||||
return (t_offset)fileaddr;
|
||||
return (t_offset)_ftelli64 (st);
|
||||
}
|
||||
|
||||
#endif /* end Windows */
|
||||
|
|
|
@ -1312,6 +1312,7 @@ switch (f) { /* case on format */
|
|||
|
||||
case MTUF_F_STD: /* standard */
|
||||
sbc = MTR_L ((bc + 1) & ~1); /* pad odd length */
|
||||
/* fall through into the E11 handler */
|
||||
case MTUF_F_E11: /* E11 */
|
||||
sim_fwrite (&bc, sizeof (t_mtrlnt), 1, uptr->fileref);
|
||||
sim_fwrite (buf, sizeof (uint8), sbc, uptr->fileref);
|
||||
|
|
Loading…
Add table
Reference in a new issue