Fixing some compiler warnings

This commit is contained in:
Ali Mashtizadeh 2015-12-10 12:21:27 -08:00
parent 3e38a6340f
commit 7bc8169ff2
5 changed files with 8 additions and 4 deletions

View File

@ -47,6 +47,8 @@ _alloc_file()
} }
// XXX: malloc // XXX: malloc
return NULL;
} }
void void

View File

@ -59,7 +59,7 @@ main(int argc, const char *argv[])
break; break;
case SYSCTL_TYPE_INT: case SYSCTL_TYPE_INT:
OSSysCtl(SYSCTLTable[i].path, &scInt, NULL); OSSysCtl(SYSCTLTable[i].path, &scInt, NULL);
printf("%s: %ld\n", SYSCTLTable[i].path, scInt.value); printf("%s: %lld\n", SYSCTLTable[i].path, scInt.value);
break; break;
case SYSCTL_TYPE_BOOL: case SYSCTL_TYPE_BOOL:
OSSysCtl(SYSCTLTable[i].path, &scBool, NULL); OSSysCtl(SYSCTLTable[i].path, &scBool, NULL);

View File

@ -170,14 +170,14 @@ MP_CrossCall(CrossCallCB cb, void *arg)
volatile CrossCallFrame frame; volatile CrossCallFrame frame;
// Setup frame // Setup frame
memset(&frame, 0, sizeof(frame)); memset((void *)&frame, 0, sizeof(frame));
frame.cb = cb; frame.cb = cb;
frame.arg = arg; frame.arg = arg;
frame.count = 1; frame.count = 1;
Critical_Enter(); Critical_Enter();
cpus[CPU()].frame = &frame; cpus[CPU()].frame = (CrossCallFrame *)&frame;
cpuid(0, 0, 0, 0, 0); cpuid(0, 0, 0, 0, 0);
if (LAPIC_Broadcast(T_CROSSCALL) < 0) if (LAPIC_Broadcast(T_CROSSCALL) < 0)

View File

@ -12,7 +12,7 @@
#include <sys/semaphore.h> #include <sys/semaphore.h>
#include <sys/thread.h> #include <sys/thread.h>
Spinlock semaListLock = { 0, 0, 0, 0, 0, 0, "Semaphore List" }; Spinlock semaListLock = { 0, 0, 0, 0, 0, 0, 0, 0, "Semaphore List" };
LIST_HEAD(SemaListHead, Semaphore) semaList = LIST_HEAD_INITIALIZER(semaList); LIST_HEAD(SemaListHead, Semaphore) semaList = LIST_HEAD_INITIALIZER(semaList);
extern uint64_t ticksPerSecond; extern uint64_t ticksPerSecond;

View File

@ -1,4 +1,6 @@
#include <unistd.h>
#include <lwip/init.h> #include <lwip/init.h>
#include <lwip/ip.h> #include <lwip/ip.h>
#include <lwip/sockets.h> #include <lwip/sockets.h>