🧹 use gcc -Wall and fix warnings
This commit is contained in:
		
							parent
							
								
									d5e7efa133
								
							
						
					
					
						commit
						3374508b1f
					
				
					 2 changed files with 4 additions and 3 deletions
				
			
		
							
								
								
									
										1
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -1,4 +1,5 @@ | |||
| TARGETS := springer | ||||
| CC := gcc -Wall | ||||
| 
 | ||||
| all: $(TARGETS) | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ | |||
| int schachbrett[GROESSE][GROESSE]; | ||||
| long int zurueck; | ||||
| 
 | ||||
| int zeigebrett() { | ||||
| void zeigebrett() { | ||||
| 	int y,x; | ||||
| 	for (y=0;y<GROESSE;y++) { | ||||
| 		for (x=0;x<GROESSE;x++) { | ||||
|  | @ -25,13 +25,13 @@ int gueltig(int x, int y) { | |||
| 		return 0; | ||||
| } | ||||
| 
 | ||||
| int springe(int x, int y, int s) { | ||||
| void springe(int x, int y, int s) { | ||||
| 	schachbrett[x][y] = s; | ||||
| 
 | ||||
| 	/* printf ("Zug %2d: %d %d\n",s,x,y); */ | ||||
| 
 | ||||
| 	if (s==GROESSE*GROESSE) { | ||||
| 		printf("yeah! %d Züge zurückgenommen!\n", zurueck); | ||||
| 		printf("yeah! %ld Züge zurückgenommen!\n", zurueck); | ||||
| 		zeigebrett(); | ||||
| 		exit(0); | ||||
| 	} | ||||
|  |  | |||
		Reference in a new issue