Fixing compiler warnings
This commit is contained in:
parent
3e85210410
commit
d729ee868d
@ -1,11 +1,13 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/nic.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <net/ethernet.h>
|
||||
|
||||
#include <syscall.h>
|
||||
#include <sys/nic.h>
|
||||
|
||||
static int nicNo = 1;
|
||||
static char buf[4096];
|
||||
static MBuf mbuf;
|
||||
|
@ -129,9 +129,7 @@ Cmd_Hexdump(int argc, const char *argv[])
|
||||
void
|
||||
Cmd_Spawn(int argc, const char *argv[])
|
||||
{
|
||||
int fd;
|
||||
uint64_t status;
|
||||
uintptr_t offset = 0;
|
||||
|
||||
if (argc != 2) {
|
||||
fputs("Requires an argument\n", stdout);
|
||||
|
@ -31,7 +31,7 @@ struct pthread {
|
||||
void *result;
|
||||
|
||||
// Condition Variables
|
||||
TAILQ_ENTRY(pthread) threadTable;
|
||||
TAILQ_ENTRY(pthread) cvTable;
|
||||
};
|
||||
|
||||
typedef TAILQ_HEAD(pthreadList, pthread) pthreadList;
|
||||
|
@ -17,10 +17,12 @@ main(int argc, const char *argv[])
|
||||
if (status == ENOENT)
|
||||
continue;
|
||||
|
||||
printf("nic%d:\n", nic.nicNo);
|
||||
printf("nic%d:\n", (int)nic.nicNo);
|
||||
printf(" ether %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
nic.mac[0], nic.mac[1], nic.mac[2],
|
||||
nic.mac[3], nic.mac[4], nic.mac[5]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -233,8 +233,8 @@ void
|
||||
E1000_RXPoll(E1000Dev *dev)
|
||||
{
|
||||
while (dev->rxDesc[dev->rxTail].status & RDESC_STATUS_DD) {
|
||||
void *data = (void *)DMPA2VA(dev->rxDesc[dev->rxTail].addr);
|
||||
uint16_t len = dev->rxDesc[dev->rxTail].len;
|
||||
//void *data = (void *)DMPA2VA(dev->rxDesc[dev->rxTail].addr);
|
||||
//uint16_t len = dev->rxDesc[dev->rxTail].len;
|
||||
|
||||
// Look for packet fragments up to EOP set in status
|
||||
if ((dev->rxDesc[dev->rxTail].status & RDESC_STATUS_EOP) &&
|
||||
@ -372,6 +372,8 @@ E1000_Enqueue(NIC *nic, MBuf *mbuf, NICCB cb, void *arg)
|
||||
dev->txTail = (dev->txTail + 1) % E1000_TX_QLEN;
|
||||
|
||||
// Wait for transmit to complete
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -368,7 +368,7 @@ O2FS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off)
|
||||
}
|
||||
|
||||
// XXX: Validation and fill in all fields
|
||||
strcpy(de.d_name, dirEntry.name);
|
||||
strcpy(de.d_name, (char *)dirEntry.name);
|
||||
|
||||
status = CopyOut(&de, (uintptr_t)buf, sizeof(de));
|
||||
if (status != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user