TD3 Remove some compilation warnings

This commit is contained in:
Yorick Barbanneau 2021-12-16 21:11:17 +01:00
parent 4a67b57492
commit b6b956400c
2 changed files with 4 additions and 7 deletions

View file

@ -231,7 +231,7 @@ ExceptionHandler (ExceptionType which)
{ {
int s = machine->ReadRegister(4); int s = machine->ReadRegister(4);
char * command = new char[MAX_STRING_SIZE]; char * command = new char[MAX_STRING_SIZE];
int size = copyStringFromMachine(s, command, MAX_STRING_SIZE); copyStringFromMachine(s, command, MAX_STRING_SIZE);
do_ForkExec(command); do_ForkExec(command);
break; break;
} }

View file

@ -92,9 +92,7 @@ void do_ThreadExit(){
currentThread->space = NULL; currentThread->space = NULL;
} }
DEBUG('x', "Thread killed!\n");
currentThread->Finish(); currentThread->Finish();
DEBUG('x', "Thread killed!\n"); DEBUG('x', "Thread killed!\n");
} }
@ -114,16 +112,15 @@ int do_ForkExec( const char * c){
file = fileSystem->Open(c); file = fileSystem->Open(c);
if (file == NULL) { if (file == NULL) {
printf("Unable to open file %s\n", file); printf("Unable to open file %s\n", c);
return -1; return -1;
} }
try { try {
space = new AddrSpace(file); space = new AddrSpace(file);
}catch(const std::bad_alloc& e) { }catch(const std::bad_alloc& e) {
printf("==> BAD ALLOC ERROR: no empty space\n"); fprintf(stderr,"no empty space on memory\n");
delete space; Exit(1);
ASSERT(false);
} }
fork = new Thread("forkThread"); fork = new Thread("forkThread");