Cleaned up a few compile complaints
This commit is contained in:
parent
8989b111c1
commit
f77a38c3c5
4 changed files with 25 additions and 25 deletions
|
@ -108,7 +108,7 @@ if ((expected_checksum != 0) && (checksum != expected_checksum)) {
|
||||||
* If the target include file already exists, determine if it contains the exact
|
* If the target include file already exists, determine if it contains the exact
|
||||||
* data in the base ROM image. If so, then we are already done
|
* data in the base ROM image. If so, then we are already done
|
||||||
*/
|
*/
|
||||||
if (iFile = fopen (include_filename, "r")) {
|
if (NULL != (iFile = fopen (include_filename, "r"))) {
|
||||||
unsigned char *IncludeData = NULL;
|
unsigned char *IncludeData = NULL;
|
||||||
char line[256];
|
char line[256];
|
||||||
int Difference = 0;
|
int Difference = 0;
|
||||||
|
|
10
sim_disk.c
10
sim_disk.c
|
@ -2550,13 +2550,13 @@ static FILE *sim_vhd_disk_open (const char *szVHDPath, const char *DesiredAccess
|
||||||
|
|
||||||
if (!hVHD)
|
if (!hVHD)
|
||||||
return (FILE *)hVHD;
|
return (FILE *)hVHD;
|
||||||
if (Status = GetVHDFooter (szVHDPath,
|
if (0 != (Status = GetVHDFooter (szVHDPath,
|
||||||
&hVHD->Footer,
|
&hVHD->Footer,
|
||||||
&hVHD->Dynamic,
|
&hVHD->Dynamic,
|
||||||
&hVHD->BAT,
|
&hVHD->BAT,
|
||||||
NULL,
|
NULL,
|
||||||
hVHD->ParentVHDPath,
|
hVHD->ParentVHDPath,
|
||||||
sizeof (hVHD->ParentVHDPath)))
|
sizeof (hVHD->ParentVHDPath))))
|
||||||
goto Cleanup_Return;
|
goto Cleanup_Return;
|
||||||
if (NtoHl (hVHD->Footer.DiskType) == VHD_DT_Differencing) {
|
if (NtoHl (hVHD->Footer.DiskType) == VHD_DT_Differencing) {
|
||||||
hVHD->Parent = (VHDHANDLE)sim_vhd_disk_open (hVHD->ParentVHDPath, "rb");
|
hVHD->Parent = (VHDHANDLE)sim_vhd_disk_open (hVHD->ParentVHDPath, "rb");
|
||||||
|
@ -2702,7 +2702,7 @@ if (SizeInBytes > ((uint64)(1024*1024*1024))*2040) {
|
||||||
Status = EFBIG;
|
Status = EFBIG;
|
||||||
goto Cleanup_Return;
|
goto Cleanup_Return;
|
||||||
}
|
}
|
||||||
if (File = sim_fopen (szVHDPath, "rb")) {
|
if (NULL != (File = sim_fopen (szVHDPath, "rb"))) {
|
||||||
fclose (File);
|
fclose (File);
|
||||||
File = NULL;
|
File = NULL;
|
||||||
Status = EEXIST;
|
Status = EEXIST;
|
||||||
|
@ -2877,13 +2877,13 @@ char *FullVHDPath = NULL;
|
||||||
size_t i, RelativeMatch, UpDirectories, LocatorsWritten = 0;
|
size_t i, RelativeMatch, UpDirectories, LocatorsWritten = 0;
|
||||||
int64 LocatorPosition;
|
int64 LocatorPosition;
|
||||||
|
|
||||||
if (Status = GetVHDFooter (szParentVHDPath,
|
if (0 != (Status = GetVHDFooter (szParentVHDPath,
|
||||||
&ParentFooter,
|
&ParentFooter,
|
||||||
&ParentDynamic,
|
&ParentDynamic,
|
||||||
NULL,
|
NULL,
|
||||||
&ParentTimeStamp,
|
&ParentTimeStamp,
|
||||||
NULL,
|
NULL,
|
||||||
0))
|
0)))
|
||||||
goto Cleanup_Return;
|
goto Cleanup_Return;
|
||||||
hVHD = CreateVirtualDisk (szVHDPath,
|
hVHD = CreateVirtualDisk (szVHDPath,
|
||||||
(uint32)(NtoHll(ParentFooter.CurrentSize)/BytesPerSector),
|
(uint32)(NtoHll(ParentFooter.CurrentSize)/BytesPerSector),
|
||||||
|
|
14
sim_ether.c
14
sim_ether.c
|
@ -664,7 +664,7 @@ void eth_zero(ETH_DEV* dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static ETH_DEV **eth_open_devices = NULL;
|
static ETH_DEV **eth_open_devices = NULL;
|
||||||
static eth_open_device_count = 0;
|
static int eth_open_device_count = 0;
|
||||||
|
|
||||||
static void _eth_add_to_open_list (ETH_DEV* dev)
|
static void _eth_add_to_open_list (ETH_DEV* dev)
|
||||||
{
|
{
|
||||||
|
@ -1394,7 +1394,7 @@ static void eth_get_nic_hw_addr(ETH_DEV* dev, char *devname)
|
||||||
for (i=0; patterns[i] && (0 == dev->have_host_nic_phy_addr); ++i) {
|
for (i=0; patterns[i] && (0 == dev->have_host_nic_phy_addr); ++i) {
|
||||||
snprintf(command, sizeof(command)-1, "ifconfig %s | %s >NIC.hwaddr", devname, patterns[i]);
|
snprintf(command, sizeof(command)-1, "ifconfig %s | %s >NIC.hwaddr", devname, patterns[i]);
|
||||||
system(command);
|
system(command);
|
||||||
if (f = fopen("NIC.hwaddr", "r")) {
|
if (NULL != (f = fopen("NIC.hwaddr", "r"))) {
|
||||||
while (0 == dev->have_host_nic_phy_addr) {
|
while (0 == dev->have_host_nic_phy_addr) {
|
||||||
if (fgets(command, sizeof(command)-1, f)) {
|
if (fgets(command, sizeof(command)-1, f)) {
|
||||||
char *p1, *p2;
|
char *p1, *p2;
|
||||||
|
@ -1580,7 +1580,7 @@ sim_debug(dev->dbit, dev->dptr, "Writer Thread Starting\n");
|
||||||
pthread_mutex_lock (&dev->writer_lock);
|
pthread_mutex_lock (&dev->writer_lock);
|
||||||
while (dev->handle) {
|
while (dev->handle) {
|
||||||
pthread_cond_wait (&dev->writer_cond, &dev->writer_lock);
|
pthread_cond_wait (&dev->writer_cond, &dev->writer_lock);
|
||||||
while (request = dev->write_requests) {
|
while (NULL != (request = dev->write_requests)) {
|
||||||
/* Pull buffer off request list */
|
/* Pull buffer off request list */
|
||||||
dev->write_requests = request->next;
|
dev->write_requests = request->next;
|
||||||
pthread_mutex_unlock (&dev->writer_lock);
|
pthread_mutex_unlock (&dev->writer_lock);
|
||||||
|
@ -1889,11 +1889,11 @@ pthread_mutex_destroy (&dev->writer_lock);
|
||||||
pthread_cond_destroy (&dev->writer_cond);
|
pthread_cond_destroy (&dev->writer_cond);
|
||||||
if (1) {
|
if (1) {
|
||||||
struct write_request *buffer;
|
struct write_request *buffer;
|
||||||
while (buffer = dev->write_buffers) {
|
while (NULL != (buffer = dev->write_buffers)) {
|
||||||
dev->write_buffers = buffer->next;
|
dev->write_buffers = buffer->next;
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
while (buffer = dev->write_requests) {
|
while (NULL != (buffer = dev->write_requests)) {
|
||||||
dev->write_requests = buffer->next;
|
dev->write_requests = buffer->next;
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
@ -2146,10 +2146,10 @@ if (!dev) return SCPE_UNATT;
|
||||||
|
|
||||||
/* Get a buffer */
|
/* Get a buffer */
|
||||||
pthread_mutex_lock (&dev->writer_lock);
|
pthread_mutex_lock (&dev->writer_lock);
|
||||||
if (request = dev->write_buffers)
|
if (NULL != (request = dev->write_buffers))
|
||||||
dev->write_buffers = request->next;
|
dev->write_buffers = request->next;
|
||||||
pthread_mutex_unlock (&dev->writer_lock);
|
pthread_mutex_unlock (&dev->writer_lock);
|
||||||
if (!request)
|
if (NULL == request)
|
||||||
request = malloc(sizeof(*request));
|
request = malloc(sizeof(*request));
|
||||||
|
|
||||||
/* Copy buffer contents */
|
/* Copy buffer contents */
|
||||||
|
|
|
@ -761,7 +761,7 @@ t_stat st;
|
||||||
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rdrecf(unit=%d, buf=%p, max=%d)\n", uptr-ctx->dptr->units, buf, max);
|
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rdrecf(unit=%d, buf=%p, max=%d)\n", uptr-ctx->dptr->units, buf, max);
|
||||||
|
|
||||||
opos = uptr->pos; /* old position */
|
opos = uptr->pos; /* old position */
|
||||||
if (st = sim_tape_rdlntf (uptr, &tbc)) /* read rec lnt */
|
if (MTSE_OK != (st = sim_tape_rdlntf (uptr, &tbc))) /* read rec lnt */
|
||||||
return st;
|
return st;
|
||||||
*bc = rbc = MTR_L (tbc); /* strip error flag */
|
*bc = rbc = MTR_L (tbc); /* strip error flag */
|
||||||
if (rbc > max) { /* rec out of range? */
|
if (rbc > max) { /* rec out of range? */
|
||||||
|
@ -823,7 +823,7 @@ t_stat st;
|
||||||
|
|
||||||
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rdrecr(unit=%d, buf=%p, max=%d)\n", uptr-ctx->dptr->units, buf, max);
|
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rdrecr(unit=%d, buf=%p, max=%d)\n", uptr-ctx->dptr->units, buf, max);
|
||||||
|
|
||||||
if (st = sim_tape_rdlntr (uptr, &tbc)) /* read rec lnt */
|
if (MTSE_OK != (st = sim_tape_rdlntr (uptr, &tbc))) /* read rec lnt */
|
||||||
return st;
|
return st;
|
||||||
*bc = rbc = MTR_L (tbc); /* strip error flag */
|
*bc = rbc = MTR_L (tbc); /* strip error flag */
|
||||||
if (rbc > max) /* rec out of range? */
|
if (rbc > max) /* rec out of range? */
|
||||||
|
|
Loading…
Add table
Reference in a new issue