Description: Fix compiler warnings in blackbox.c Author: Adrian Bunk --- black-box-1.4.8.orig/src/blackbox.c +++ black-box-1.4.8/src/blackbox.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -553,6 +554,11 @@ void show_real() SDL_UpdateRect(screen,0,0,0,0); } +static int abrand(int a,int b) //random number between a and b (inclusive) +{ + return(a+(rand() % (b-a+1))); +} + void generate_field() { int x,y; @@ -852,11 +858,6 @@ void click() this_turn_demo=0; } -int abrand(int a,int b) //random number between a and b (inclusive) -{ - return(a+(rand() % (b-a+1))); -} - void get_click() { while ( SDL_WaitEvent(&event) >= 0 ) { @@ -895,7 +896,7 @@ void init_sound() } } -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { printf("\nBlack-Box version %s, Copyright (C) 2000-2008 Karl Bartel\n",VERSION); printf("Black-Box comes with ABSOLUTELY NO WARRANTY; for details see COPYING'.\n");