A lot of cleanaps, got rid of all warnings with -Wall;

The makefile now uses -Wall.
This commit is contained in:
OBattler
2017-06-16 06:44:11 +02:00
parent 464b1a624f
commit 8061db66fe
60 changed files with 1614 additions and 1693 deletions

View File

@@ -1591,8 +1591,8 @@ nic_pci_write(int func, int addr, uint8_t val, void *priv)
val |= 0x01; /* re-enable IOIN bit */
/*FALLTHROUGH*/
case 0x11: /* PCI_BAR
case 0x12: /* PCI_BAR
case 0x11: /* PCI_BAR */
case 0x12: /* PCI_BAR */
case 0x13: /* PCI_BAR */
/* Remove old I/O. */
nic_ioremove(dev, dev->base_address);
@@ -1819,6 +1819,11 @@ nic_rom_init(nic_t *dev, wchar_t *s)
uint32_t temp;
FILE *f;
if (s == NULL)
{
return;
}
if (dev->bios_addr > 0) {
if ((f = romfopen(s, L"rb")) != NULL) {
fseek(f, 0L, SEEK_END);
@@ -1864,6 +1869,7 @@ nic_init(int board)
dev = malloc(sizeof(nic_t));
memset(dev, 0x00, sizeof(nic_t));
dev->board = board;
rom = NULL;
switch(dev->board) {
case NE2K_NE1000:
strcpy(dev->name, "NE1000");

View File

@@ -67,7 +67,6 @@ slirp_tic(void)
static void
poll_thread(void *arg)
{
uint8_t *mac = (uint8_t *)arg;
struct queuepacket *qp;
event_t *evt;
@@ -112,8 +111,6 @@ poll_thread(void *arg)
int
network_slirp_setup(uint8_t *mac, NETRXCB func, void *arg)
{
int rc;
pclog("SLiRP: initializing..\n");
if (slirp_init() != 0) {

View File

@@ -153,8 +153,6 @@ network_close(void)
void
network_reset(void)
{
int i = 0;
pclog("NETWORK: reset (type=%d, card=%d)\n", network_type, network_card);
/* Just in case.. */

View File

@@ -90,7 +90,7 @@ hex_dump(unsigned char *bufp, int len)
while (len-- > 0) {
c = bufp[addr];
if ((addr % 16) == 0)
printf("%04x %02x", addr, c);
printf("%04lx %02x", addr, c);
else
printf(" %02x", c);
asci[(addr & 15)] = (uint8_t)isprint(c) ? c : '.';
@@ -175,7 +175,7 @@ start_cap(char *dev)
strftime(temp, sizeof(temp), "%H:%M:%S", ltime);
/* Process and print the packet. */
printf("\n<< %s,%.6d len=%d\n",
printf("\n<< %s,%.6ld len=%u\n",
temp, hdr->ts.tv_usec, hdr->len);
rc = eth_prhdr((unsigned char *)pkt);
hex_dump((unsigned char *)pkt+rc, hdr->len-rc);
@@ -227,7 +227,6 @@ int
main(int argc, char **argv)
{
dev_t interfaces[32];
dev_t *dev = interfaces;
int numdev, i;
/* Try loading the DLL. */