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);
char * command = new char[MAX_STRING_SIZE];
int size = copyStringFromMachine(s, command, MAX_STRING_SIZE);
copyStringFromMachine(s, command, MAX_STRING_SIZE);
do_ForkExec(command);
break;
}

View file

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