fix some warnings

This commit is contained in:
Elias Bennour 2023-10-15 19:05:43 +02:00
parent 19de6c2dbc
commit 4f23944408

10
njvm.c
View File

@ -31,7 +31,8 @@ void stackPush(unsigned int value){
stack[current] = value;
current++;
}
unsigned int stackPop(){
unsigned int stackPop(void) {
if (current < 1) {
fprintf(stderr, "stack underflow\n");
exit(EXIT_FAILURE);
@ -39,11 +40,11 @@ unsigned int stackPop(){
return --current;
}
void version() {
void version(void) {
printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", 0, __DATE__, __TIME__);
}
void help() {
void help(void) {
printf("usage: ./njvm [option] [option] ...\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit\n");
}
@ -58,7 +59,8 @@ void useption(int argc, char *argv[]){
}
}
}
void execute(){
void execute(void) {
int i = 0;
while (programmSpeicher[i] != 0) {